• Resolved gpalowitch

    (@gpalowitch)


    Hi Eliot,

    If it is at all possible, would you be able to include or point out where it already exists to do something as shown below.

    [if condition]
       [if condition]
       [/if]
       [if condition]
       [/if]
       <other code>
    [/if]

    This would require the [/if] tags to know which [if] tag they are ending while keeping the others still going.

    Thanks,
    Garrett

    https://ww.wp.xz.cn/plugins/custom-content-shortcode/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Eliot Akira

    (@miyarakira)

    In the latest update, I implemented a way to have nested conditions. WordPress doesn’t support nesting shortcodes with the same name, so I got around it with the following syntax:

    [if condition]
       [-if condition]
       [-else]
       [/-if]
    [else]
    ..
    [/if]
    Thread Starter gpalowitch

    (@gpalowitch)

    Thanks for adding it Eliot!

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

The topic ‘Nested Ifs’ is closed to new replies.