Adding and rendering shortcodes from other plugins (eg Tabulizer not working)

Support MB Custom Post Type Adding and rendering shortcodes from other plugins (eg Tabulizer not working)Resolved

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #35195
    Chris PChris P
    Participant

    Hi, when I use a shortcode from the Tabulizer plugin it doesn't get rendered in my cpt.

    How do I fix this.

    The creator of the plugin told me this filter takes care of it it but where or how do I add it?

    add_filter( 'the_content', array( $this, 'process_tags') );

    {tabulizer:data_source[NhL4oUFLQBKs04c0aB946APi]}

    Sorry not a developer.

    Br,
    Chris

    #35209
    Long NguyenLong Nguyen
    Moderator

    Hi Chris,

    You can add the custom code to the file functions.php in the theme/child theme folder, or use the plugin Code Snippets https://wordpress.org/plugins/code-snippets/

    But I recommend contacting Tabulizer support to implement the code step by step if you are not familiar with coding.

    #35216
    Chris PChris P
    Participant

    Did that, they referred to you 😀

    add_filter( 'the_content', array( $this, 'process_tags') );

    So, you (or the post type creator) should make sure that the "content" is returned for the specific post type.

    #35400
    Chris PChris P
    Participant

    Hello,

    Can you point me in the right direction as to how I can let the wysiwyg field return content
    Or how I can let the shortcode of that plugin render.

    Many thanks in advance

    #35422
    Long NguyenLong Nguyen
    Moderator

    Hi Chris,

    If you want to render the shortcode in the wysiwyg content on the frontend, please follow this documentation https://docs.metabox.io/fields/wysiwyg/#template-usage

    $value = rwmb_meta( 'wysiwyg_field_id' );
    echo do_shortcode( wpautop( $value ) );
    
    #35556
    Chris PChris P
    Participant

    Ok thx

    And how do I add it via MB views in twig

    I tried:

    {% set outputter = mb.rwmb_meta(wysiwyg_outputs) %}
    {{ mb.do_shortcode( mb.wpautop(outputter)) }}

    But alas

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.