I am using Bricksbuilder.
Now I discovered that Bricksbuilder templates or shortcodes are not accepted or better they do not work properly.
(The content shall be enhanced with shortcodes inside the text to avoid long text only blocks)
To be honest, I cannot believe this...
What's going on here?
Let's assume a Bricksbuilder template is created, shortcode = [bricks_template id="12345"].
This template consists (next to HTML) of some PHP Code and as well some CSS applied by the builder (both are not working).
1. Now I create a regular post (Gutenberg) and put in the shortcode, result: all is working.
2. Now I create a Bricksbuilder template and use a Rich text element with shortcode, result: all is working.
3. Now I create a CPT (MetaBox) and use the rich text element, result: NOT WORKING properly!!!
Please let me know why it is not possible to use shortcodes properly with MetaBox WYSIWIG field???
Is there a filter or anything I can do to get shortcodes fully supported?
If you want to run the shortcode in the WYSIWYG field value, please follow the documentation
Or use the helper shortcode https://docs.metabox.io/shortcode/
Sorry - this absolutely gives me no additional knowledge, nor any answer to my question.
I know how to use the MB fields in templates.
I do not need to change p tags.
I would not ask if the documentation would cover this issue.
I NEED TO USE A SHORTCODE INSIDE THE WYSIWIG FIELD WHICH IS NOT WORKING.
As described in Gutenberg or in other similar rich text fields this is working without any hassle.
Only in your WYSIWIG field it is not working.
Again: What is the reason for this?
Please provide an example of how to use a shortcode inside a WYSIWYG field.
Maybe I missed something.
Question: I don't believe so, but is this related?
To be more specific and clear:
I do NOT want to use a shortcode (like php echo do_shortcode....) before or after the WYSIWYG field. I want to use any shortcode at any place inside the WYSIWYG field, like:
<p> this is some text inside the WYSIWYG/TinyCMS </p>
<p> some other text inside the field</b>
As it is possible in Gutenberg or other rich text fields, I want to place a shortcode at any place wished inside the text (WYSIWYG field).
I have seen https://support.metabox.io/topic/shortcodes-from-other-plugins-not-rendering-in-metabox-fields but this is not the or a valid answer.
Hope this clarifies the issue.
I understand you want to render the shortcode in the WYSIWYG field value. And it is already noted in the documentation
Note that the helper function doesn't format the value of this field nor run shortcodes in the content. In case you want to make it behaves similar to the post content (e.g. format and shortcodes), use this code:
$value = rwmb_meta( 'wysiwyg_field_id' );
$value = do_shortcode( wpautop( $wp_embed->autoembed( $value ) ) );
render_shortcode Whether to render inner shortcodes inside the value of the field. For example, if you enter a shortcode in a textarea/editor field, this attribute will render that shortcode and return the rendered content. Default true.
Have you applied those on your site and see how it goes?
Sorry for not being able to immediately understand.
But -of course- and luckily it's working now.