For example, in below code snippet, there are some types for custom metabox input fields such as text and textarea.So, I want to learn other types.I searched it on google also w.se but I couldnt.For example, I want to learn e-mail type.
array(
'name' => 'Instagram',
'desc' => 'You should write Instagram link here',
'id' => $prefix . 'text-instagram',
'type' => 'text',
'std' => '/?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...'
)
For example, in below code snippet, there are some types for custom metabox input fields such as text and textarea.So, I want to learn other types.I searched it on google also w.se but I couldnt.For example, I want to learn e-mail type.
array(
'name' => 'Instagram',
'desc' => 'You should write Instagram link here',
'id' => $prefix . 'text-instagram',
'type' => 'text',
'std' => 'https://www.instagram/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...'
)
Share
Improve this question
asked Apr 22, 2020 at 18:52
I dont believe youI dont believe you
112 bronze badges
1 Answer
Reset to default 0It would be useful if you specify if you are using a plugin to develop these metaboxes, to narrow down the answer.
If you're working with CMB2, you're looking for text_url field ty (see the full list in CMB2 GitHub page.).
If you're working with MetaBox, then text would be the one as url fields are implicit within it. See the full list of field types here.
Same goes for ACF (text field) or page_link. Check the full list of available field types in their official docs.
But then there's the option to create your own field types.
Hope this helps.