Title: [Plugin: Shortcodes Ultimate] Adding Tab/Tabs Shortcode to Theme
Last modified: August 20, 2016

---

# [Plugin: Shortcodes Ultimate] Adding Tab/Tabs Shortcode to Theme

 *  [plumwd](https://wordpress.org/support/users/plumwd/)
 * (@plumwd)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-shortcodes-ultimate-adding-tabtabs-shortcode-to-theme/)
 * 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);?>
       ```
   
 * [http://wordpress.org/extend/plugins/shortcodes-ultimate/](http://wordpress.org/extend/plugins/shortcodes-ultimate/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [plumwd](https://wordpress.org/support/users/plumwd/)
 * (@plumwd)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-shortcodes-ultimate-adding-tabtabs-shortcode-to-theme/#post-2816720)
 * 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.

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Shortcodes Ultimate] Adding Tab/Tabs Shortcode to Theme’ is 
closed to new replies.

 * ![](https://ps.w.org/shortcodes-ultimate/assets/icon-256x256.gif?rev=2547563)
 * [Shortcodes Ultimate - Content Elements](https://wordpress.org/plugins/shortcodes-ultimate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcodes-ultimate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcodes-ultimate/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcodes-ultimate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcodes-ultimate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcodes-ultimate/reviews/)

## Tags

 * [tab](https://wordpress.org/support/topic-tag/tab/)

 * 1 reply
 * 1 participant
 * Last reply from: [plumwd](https://wordpress.org/support/users/plumwd/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-shortcodes-ultimate-adding-tabtabs-shortcode-to-theme/#post-2816720)
 * Status: not resolved