Title: how i can create shortcode inside
Last modified: June 6, 2021

---

# how i can create shortcode inside

 *  Resolved [noam69901](https://wordpress.org/support/users/noam69901/)
 * (@noam69901)
 * [5 years ago](https://wordpress.org/support/topic/how-i-can-create-shortcode-inside/)
 * its not work in my web why ?
 *     ```
       add_filter( 'woocommerce_product_tabs', 'wpb_new_product_tab' );
       function wpb_new_product_tab( $tabs ) {
           // Add the new tab
           $tabs['test_tab'] = array(
               'title'       => __( 'Size Chart', 'text-domain' ),
               'priority'    => 50,
               'callback'    => 'wpb_new_product_tab_content'
           );
           return $tabs;
       }
   
       function wpb_new_product_tab_content() {
           // The new tab content
           echo 'Size Chart';
           echo '[table id=2 responsive=collapse responsive_breakpoint="phone" /]
       " /.';          
       }
       ```
   
    -  This topic was modified 5 years ago by [Yui](https://wordpress.org/support/users/fierevere/).
    -  This topic was modified 5 years ago by [Yui](https://wordpress.org/support/users/fierevere/).
      Reason: please use CODE button for code formatting
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fhow-i-can-create-shortcode-inside%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/how-i-can-create-shortcode-inside/#post-14754211)
 * You just need to wrap your text in [`do_shortcode()`](https://developer.wordpress.org/reference/functions/do_shortcode/):
 * `echo do_shortcode( '[table id=2 responsive=collapse responsive_breakpoint="phone"/]');`

Viewing 1 replies (of 1 total)

The topic ‘how i can create shortcode inside’ is closed to new replies.

 * ![](https://ps.w.org/code-snippets/assets/icon.svg?rev=2148878)
 * [Code Snippets](https://wordpress.org/plugins/code-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippets/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/how-i-can-create-shortcode-inside/#post-14754211)
 * Status: resolved