例如,在下面的代码片段中,有一些类型用于自定义的metabox输入字段,如text和textarea.So,我想学习其他类型,我在google也w.se.com上搜索了它,但是我couldnt.For示例,我想学习电子邮件类型。
array(
'name' => 'Instagram',
'desc' => 'You should write Instagram link here',
'id' => $prefix . 'text-instagram',
'type' => 'text',
'std' => 'https://www.instagram.com/britneyspears/?hl=tr'
),
array(
'name' => 'Additional Post Description while hover thumbnail',
'desc' => 'The text will shown on post thumbnail via our elementor post widget',
'id' => $prefix . 'textarea',
'type' => 'textarea',
'std' => 'Its amazing story so I dont know where must I start to tell...'
)发布于 2020-04-23 10:08:18
如果您指定是否使用插件来开发这些metaboxes,以缩小答案范围,这将是非常有用的。
如果您正在使用CMB2,则需要查找text_url字段ty (参见CMB2 GitHub页面中的全表 )。
如果您正在使用MetaBox,那么文本就是其中的文本,因为url字段是隐含在其中的。见此处字段类型的完整列表。
ACF (文本字段)或page_link也是如此。检查其官方文件中可用字段类型的完整列表。
但是还有一个选项可以创建您自己的字段类型。
希望这能有所帮助。
https://wordpress.stackexchange.com/questions/364788
复制相似问题