Title: Problem with nested shortcodes
Last modified: May 23, 2017

---

# Problem with nested shortcodes

 *  Resolved [Magic-Komplex](https://wordpress.org/support/users/magic-komplex/)
 * (@magic-komplex)
 * [9 years ago](https://wordpress.org/support/topic/problem-with-nested-shortcodes/)
 * Hi there again,
 * I have some issues with nested shortcodes, as there is a form I need to show 
   repeatedly from the 10th to 25th, every second month (1,3,5,7,9,11), every year.
 * This is what I have:
 *     ```
       [time-restrict-repeat type="annually" onmonth="January" ondate="10" offmonth="January" offdate="26" else="Lebensmittel können zur Zeit nicht bestellt werden."]
       [time-restrict-repeat-2 type="annually" onmonth="March" ondate="10" offmonth="March" offdate="26" else="Lebensmittel können zur Zeit nicht bestellt werden."]
       [time-restrict-repeat-3 type="annually" onmonth="May" ondate="10" offmonth="May" offdate="26" else="Lebensmittel können zur Zeit nicht bestellt werden."]
       [time-restrict-repeat-4 type="annually" onmonth="July" ondate="10" offmonth="July" offdate="26" else="Lebensmittel können zur Zeit nicht bestellt werden."]
       [time-restrict-repeat-5 type="annually" onmonth="September" ondate="10" offmonth="September" offdate="26" else="Lebensmittel können zur Zeit nicht bestellt werden."]
       [time-restrict-repeat-5 type="annually" onmonth="November" ondate="10" offmonth="November" offdate="26" else="Lebensmittel können zur Zeit nicht bestellt werden."]
       [caldera_form id="CF591eb3cced9b9"]
       [/time-restrict-repeat-6]
       [/time-restrict-repeat-5]
       [/time-restrict-repeat-4]
       [/time-restrict-repeat-3]
       [/time-restrict-repeat-2]
       [/time-restrict-repeat]
       ```
   
 * The problem is that it works fine and as expected as long as I don’t nest more
   than 3 shortcodes (Januar, March, May). After adding the fourth shortcode (July),
   it displays the form (as expected) and the fourth shortcode above the form. If
   I add another shortcode (September), this one is displayed above the form as 
   well.
    Isn’t it possible to nest more than three shortcodes, and if so, is there
   another way to solve my task?
 * I really hope this isn’t another stupid mistake again, but I tried this for hours
   now and really don’t know what to do. So any help is really appreciated again.
   🙂

Viewing 1 replies (of 1 total)

 *  Plugin Author [Dave Clements](https://wordpress.org/support/users/thewanderingbrit/)
 * (@thewanderingbrit)
 * [9 years ago](https://wordpress.org/support/topic/problem-with-nested-shortcodes/#post-9165418)
 * A couple of issues:
    1. There is no support for time-restrict-repeat-4, 5 or 6 shortcodes. The plugin
       only supports up to three.
    2. You don’t really want to nest the shortcodes. Each of these are independent 
       from one another. That is, the fact that the form needs to display in January
       is separate from the rules for the form displaying in March. The remedy is to
       create separate shortcodes for each:
 * `[time-restrict-repeat type="annually" onmonth="January" ondate="10" offmonth
   ="January" offdate="26" else="Lebensmittel können zur Zeit nicht bestellt werden."][
   caldera_form id="CF591eb3cced9b9"][/time-restrict-repeat][time-restrict-repeat
   type="annually" onmonth="March" ondate="10" offmonth="March" offdate="26" else
   ="Lebensmittel können zur Zeit nicht bestellt werden."][caldera_form id="CF591eb3cced9b9"][/
   time-restrict-repeat]`
 * etc.

Viewing 1 replies (of 1 total)

The topic ‘Problem with nested shortcodes’ is closed to new replies.

 * ![](https://ps.w.org/shortcodes-to-show-or-hide-content/assets/icon-256x256.jpg?
   rev=984372)
 * [Show/Hide Content at Set Time](https://wordpress.org/plugins/shortcodes-to-show-or-hide-content/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcodes-to-show-or-hide-content/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcodes-to-show-or-hide-content/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcodes-to-show-or-hide-content/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcodes-to-show-or-hide-content/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcodes-to-show-or-hide-content/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Dave Clements](https://wordpress.org/support/users/thewanderingbrit/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/problem-with-nested-shortcodes/#post-9165418)
 * Status: resolved