Title: Nested shortcoder short codes issue
Last modified: May 21, 2020

---

# Nested shortcoder short codes issue

 *  Resolved [dkpminus](https://wordpress.org/support/users/dkpminus/)
 * (@dkpminus)
 * [6 years ago](https://wordpress.org/support/topic/nested-shortcoder-short-codes-issue/)
 * I am testing out the plugin and what I am trying to do it use it to add shortcodes
   for use with bootstrap elements.
 * In this case I wanted to start with making a shortcode for an accordion. Since
   there could be a varied number of collapsible elements I made two short codes,
   one for the wrapper and one for each panel.
 * However it seems to not work properly. Code below.
    Here is an image of how the
   code is rendering on the frontend.
 * > [View post on imgur.com](https://imgur.com/yyIsIMf)
 * `[sc name="accordion-wrapper" ][sc name="accordion-panel-content" panelcode="
   cg1" paneltitle="Collapsible Group 1"]Content here.[/sc][/sc]`
 * Short Code 1
    `<div class="panel-group" id="accordion">$$enclosed_content$$</
   div>`
 * Short Code 2
 *     ```
       <div class="panel panel-default">
         <div class="panel-heading">
           <h4 class="panel-title">
             <a data-toggle="collapse" data-parent="#accordion" href="#%%panelcode%%">%%paneltitle%%</a>
           </h4>
         </div>
         <div id="%%panelcode%%" class="panel-collapse collapse">
         	<div class="panel-body">$$enclosed_content$$</div>
         </div>
       </div>
       ```
   

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

 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [6 years ago](https://wordpress.org/support/topic/nested-shortcoder-short-codes-issue/#post-12872415)
 * Hi [@dkpminus](https://wordpress.org/support/users/dkpminus/),
 * Shortcodes have certain limitations and it applies to any shortcode with same
   name. WordPress’s shortcode parser works that way.
 * Please see note in wordpress doc here for more info – [https://codex.wordpress.org/Shortcode_API#Limitations](https://codex.wordpress.org/Shortcode_API#Limitations)
 * I understand the need of it. But the API provided does not support. I would have
   to come up someother way.
 * For now I would suggest you to add the HTML to PHP code itself like in the example–
   [https://codex.wordpress.org/Shortcode_API#The_Shortcode_API](https://codex.wordpress.org/Shortcode_API#The_Shortcode_API)
 * Thanks,
    Aakash
 *  Thread Starter [dkpminus](https://wordpress.org/support/users/dkpminus/)
 * (@dkpminus)
 * [6 years ago](https://wordpress.org/support/topic/nested-shortcoder-short-codes-issue/#post-12873467)
 * Got it, thank you for the reply. I’m just trying to figure out an easy way to
   make it so some of the Bootstrap elements can be utilized.
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [6 years ago](https://wordpress.org/support/topic/nested-shortcoder-short-codes-issue/#post-12873600)
 * Cheers !

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

The topic ‘Nested shortcoder short codes issue’ is closed to new replies.

 * ![](https://ps.w.org/shortcoder/assets/icon.svg?rev=2222236)
 * [Shortcoder — Create Shortcodes for Anything](https://wordpress.org/plugins/shortcoder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcoder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcoder/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcoder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcoder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcoder/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [vaakash](https://wordpress.org/support/users/vaakash/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/nested-shortcoder-short-codes-issue/#post-12873600)
 * Status: resolved