Title: PHP inside TABS shortcode in a template?
Last modified: August 22, 2016

---

# PHP inside TABS shortcode in a template?

 *  Resolved [Shafar](https://wordpress.org/support/users/shafar/)
 * (@shafar)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-inside-tabs-shortcode-in-a-template/)
 * Hi, I’m trying to show a list of categories from a parent category inside TABS
   shortcode in a page template. Can someone correct the code below!
 *     ```
       <?php echo do_shortcode('[tabs][tab title="CATEGORY-1"] <?php wp_list_categories('show_count=1&child_of=11); ?> [/tab]
       [tab title="CATEGORY-2"] <?php wp_list_categories('show_count=1&child_of=12); ?> [/tab][/tabs]') ?>
       ```
   
 * Please help!

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-inside-tabs-shortcode-in-a-template/#post-5282459)
 * Are you using a plugin for these tabs?
 *  Thread Starter [Shafar](https://wordpress.org/support/users/shafar/)
 * (@shafar)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-inside-tabs-shortcode-in-a-template/#post-5282461)
 * Yes, this one:
    [http://wordpress.org/plugins/wp-shortcode/](http://wordpress.org/plugins/wp-shortcode/)
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-inside-tabs-shortcode-in-a-template/#post-5282462)
 * I think you need to post here: [http://wordpress.org/support/plugin/wp-shortcode#postform](http://wordpress.org/support/plugin/wp-shortcode#postform)
 *  Thread Starter [Shafar](https://wordpress.org/support/users/shafar/)
 * (@shafar)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-inside-tabs-shortcode-in-a-template/#post-5282464)
 * Thanks. It’s a general question too! I think a PHP/wordpress expert can help 
   me.
 * _[Moved to How-To and Troubleshooting forum]_
 *  Thread Starter [Shafar](https://wordpress.org/support/users/shafar/)
 * (@shafar)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/php-inside-tabs-shortcode-in-a-template/#post-5282633)
 * For those who are looking for the answer, I found it and it was simple! Add shortcode
   to the page, view and copy the source code, add php code and create a page template!
 * Thanks

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘PHP inside TABS shortcode in a template?’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [Shafar](https://wordpress.org/support/users/shafar/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/php-inside-tabs-shortcode-in-a-template/#post-5282633)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
