[resolved] Nested expand shortcodes (4 posts)

  1. AaronAsh
    Posted 3 years ago #

    Hi all,

    I wanted to use nested expand shortcodes and found that wordpress doesn't support that out of the box.

    I have modified collapse-o-matic.php so that it supports nested expand blocks. The code comes originally from the way the j-shortcodes plugin handles it (you can see this here: http://plugins.trac.wordpress.org/browser/j-shortcodes/trunk/j-utils.php).

    Here is my modified collapse-o-matic.php: http://pastebin.com/kNRiRG2P

    I thought I'd post this here in case the developer wants to include that in the plugin or anyone else wants to use it.


    [expand title='Root Expand block']
      This is the root expand block.
      [=expand title='Nest level 1']
        Nested block level 1
        [==expand title='Nest level 2']
          Nested block level 2.


  2. AaronAsh
    Posted 3 years ago #

    Here's a screenshot: http://i.imgur.com/Eogzj.png

  3. Baden
    Plugin Author

    Posted 3 years ago #

    Thank you for your code contribution. We certainly want the plugin to work out of the box, however what exactly is not working for you? Did you structure your nested expands as described and demonstrated in the documentation on Nested Expand Elements?

    Regardless, we are always thankful for feedback from our users... twice as thankful when the feedback includes patches.

  4. AaronAsh
    Posted 3 years ago #

    Haha crap.

    Turns out I just hadn't read the docs properly.

    Oh well, cheers for an excellent plugin anyway! :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Collapse-O-Matic
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic