do_shortcode('[tabby …]') needs to be echoed
-
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.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘do_shortcode('[tabby …]') needs to be echoed’ is closed to new replies.