Support Forum
Hi
Is it possible to create reusable shortcodes with Meta Box plugin?
For Ex: - I create "button" meta box for post.
/* Button
---------------------------------------- */
array(
'id' => 'button',
'tab' => 'button',
'type' => 'group',
'fields' => array(
array(
'id' => 'icon',
'name' => 'Icon',
'type' => 'text',
),
array(
'id' => 'label',
'name' => 'Label',
'type' => 'text',
),
array(
'id' => 'position',
'name' => 'Position',
'type' => 'text',
),
array(
'id' => 'target',
'name' => 'Target',
'type' => 'text',
),
array(
'id' => 'url',
'name' => 'URL',
'type' => 'url',
),
),
),
And I want to reuse that "button" meta box more than one time with different values on particular post. As a shortcode.
Can it be achieved with Meta Box?
Thanks always and looking forward.
Hi,
Please correct me if I'm wrong. I understand that you want to use Meta Box like a shortcode generator, so when users click on a "trigger button", it shows a form to enter those info for a button. Then clicking on "Insert" button will inserts a shortcode to the post content?
If that's correct, then I'm afraid to say it's not supported at the moment. The purpose of the shortcode is presenting the data, while the purpose of Meta Box is saving the data. Although they might share the same form, but the goals are different.