Let me clarify - I don't want to create a shortcode of the Meta Box custom field, I need to add an existing shortcode from another plugin (in this case to show a registration form on the front end).
Here's my workflow:
Create CPT > Add custom field for shortcode > copy/paste registration form shortcode into custom field > registration form is visible on the front end.
If it matters, I'll be using Elementor to pull the custom fields to a template for the CPT.
Maybe there is a function I can add to my theme file to let me add shortcodes to the custom HTML field?
If you want to insert a shortcode from another plugin, you can just use the widget Shortcode of Elementor to insert it, no need to insert via a custom field.
I inserted in WYSIWYG-Field a shortcode from Plugin "Content Blocks (Custom Post Widget)".
But if i use rwmb_meta("acf-single-prod-summary-prolog") it outputs only the string of shortcode like this: [content_block slug=s-prod-summary-prolog-3dportrait]
I've now noticed that there is a need to run an extra line of code.
echo do_shortcode( wpautop( $value ) )
I work with Oxygenbuilder's repeater element.
I have no way of executing this code in it.
Is there a way i can basically define the output as rendered, or do you have another idea?
Hey there, is there any solution to this?
I have also migrated from ACF to MB and I can as well confirm that in ACF shortcodes as values were generated properly on front end. Now with Metabox, using similar settings, shortcode is generated as text on front end.
Astwert, if it helps in any way, for one of my simple use cases (not in repeater) I'm applying a workaround to put all possible shortcodes inside oxy template and make use of MetabBox fields for display conditions. It's a pain but it works.
@MetaBox, any guidance (or better yet a properly integrated solution to this) would be highly appreciated.
As you can read on the documentation, the helper shortcode [rwmb_meta] supports rendering the inner shortcode inside the field value. You need to set the attribute render_shortcode to true. https://docs.metabox.io/shortcode/