• Resolved ypeynaud

    (@ypeynaud)


    Hi there,

    Actually I just solved my problem. It is just to mention that some ‘echo’ statements are missing in the examples given in support threads regarding the usage of Tabby shortcodes in php templates.

    Thus this php code given in this thread:

    <?php
    do_shortcode('[tabby title="Tab 1"]'); ?>
    This is the content of the first tab
    
    <?php do_shortcode('[tabby title="Tab 2"]');
    do_shortcode('[someshortcode]');
    
    do_shortcode('[tabby title="Tab 3"]');
    somefunction();
    
    do_shortcode('[tabbyending]');
    ?>

    doesn’t work since the ‘echo’ statements are missing. This code is correct:

    <?php
    echo do_shortcode('[tabby title="Tab 1"]'); ?>
    This is the content of the first tab
    
    <?php echo do_shortcode('[tabby title="Tab 2"]');
    echo do_shortcode('[someshortcode]');
    
    echo do_shortcode('[tabby title="Tab 3"]');
    somefunction();
    
    echo do_shortcode('[tabbyending]');
    ?>

    It may save some time to people like me not very familiar with using the do_shortcode statement, but usually calling the php functions directly.

    Anyway, thanks a lot for the great plugin and support!

    Yves.

    https://www.ads-software.com/plugins/tabby-responsive-tabs/

Viewing 1 replies (of 1 total)
  • Plugin Author cubecolour

    (@numeeja)

    glad you worked it out. I’ll make a note to have a look over the documentation the next time I push an update to the plugin and will probably add whatever clarification is required at that time.

    Thanks for the heads-up.

Viewing 1 replies (of 1 total)
  • The topic ‘do_shortcode('[tabby …]') needs to be echoed’ is closed to new replies.