Shortcodes Ultimate
Adding Tab/Tabs Shortcode to Theme (2 posts)

  1. plumwd
    Posted 4 years ago #

    I'm trying to add the tab/tabs shortcodes to my theme, to display a specific type of posts in the tab list.

    What's happening is that my content is displayed successfully, but not inside the tabs. Instead it appears above the tab list. The tabs are created, but are empty.

    Below is the code in my template:

    <?php $mytabs = '[tabs style="3"]'; ?>
    <?php query_posts('post_type=portfolio'); ?>
                                <?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
                                <?php $title = trim(the_title('<span>', '</span>'));?>
                                <?php $mytabs .= "[tab title=\"".$title."\"]the text[/tab]";?>
                                <?php endwhile; ?>
                                <?php endif; ?>
                                <?php $mytabs .= '[/tabs]'; ?>
                                <?php echo do_shortcode($mytabs);?>


  2. plumwd
    Posted 4 years ago #

    It figures that literally the second I posted, I realized I should be using get_the_title and get_the_content instead.

    Ignore this post.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Shortcodes Ultimate
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic