Title: Adding multiple collapsible content blocks
Last modified: August 21, 2016

---

# Adding multiple collapsible content blocks

 *  Resolved [MelissaLaverty](https://wordpress.org/support/users/melissalaverty/)
 * (@melissalaverty)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/adding-multiple-collapsible-content-blocks/)
 * Is it possible to add multiple collapsible links? When I add more than one, only
   the last one added is expanded when the link is clicked.
 * Thanks
 * [https://wordpress.org/plugins/expandcollapse-funk/](https://wordpress.org/plugins/expandcollapse-funk/)

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

 *  Plugin Author [Evan Herman](https://wordpress.org/support/users/eherman24/)
 * (@eherman24)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/adding-multiple-collapsible-content-blocks/#post-4652415)
 * Do you mean nested links? Like
 *     ```
       Parent
         > Child #1
           > Child of Child #1
         > Child #2
           > Child of Child #2
           > Child of Child #2
           > Child of Child #2
         > Child #3
       ```
   
 * If so , this is not possible at the moment. Well , in a way it is, it would just
   take some adjustment of the HTML code that gets placed onto the page. Without
   having it in front of me it’s hard to specify how the code should be structured
   to achieve this.
 * If you are just trying to add multiple links, you should be able to no problem.
   The plugin works by expanding the hidden content directly below the link. Having
   multiple links on one page shouldn’t affect how that functions. Clicking one 
   link should just expand the content below it, and no others.
 *  Plugin Contributor [Matthieu S](https://wordpress.org/support/users/sartmatt/)
 * (@sartmatt)
 * [12 years ago](https://wordpress.org/support/topic/adding-multiple-collapsible-content-blocks/#post-4652441)
 * Hi,
 * I managed to make nested expandable items.
    The required HTML code can be seen
   here : [http://matthieu.sarter.fr/nested-sample](http://matthieu.sarter.fr/nested-sample)
 * It required a little change in the JavaScript code from expand-collapse-funk.
   php :
    jQuery(this).toggleClass(“ecf_opened”).parent(“.exp-col-content-holder”).
   find(“.hidden-content”).first().stop().slideToggle(“slow”).css(“display”,”block”);
   instead of jQuery(this).toggleClass(“ecf_opened”).parent(“.exp-col-content-holder”).
   find(“.hidden-content”).stop().slideToggle(“slow”).css(“display”,”block”);
 * Without this change, when clicking on “Parent”, everything is expanded, instead
   of just expanding the first level.
 *  Plugin Author [Evan Herman](https://wordpress.org/support/users/eherman24/)
 * (@eherman24)
 * [12 years ago](https://wordpress.org/support/topic/adding-multiple-collapsible-content-blocks/#post-4652442)
 * Thanks for sharing the necessary code SartMatt. I’m sure that will help future
   users of the plugin.
 * I will look into implementing these changes into future iterations of the plugin.
 *  Plugin Contributor [Matthieu S](https://wordpress.org/support/users/sartmatt/)
 * (@sartmatt)
 * [12 years ago](https://wordpress.org/support/topic/adding-multiple-collapsible-content-blocks/#post-4652443)
 * You’re welcome.
 * FYI, I’m also working on some other improvements (shortcode, enhanced compatibility
   with disabled JavaScript…).
    If you are interested, I can also share them when
   completed.
 *  Plugin Author [Evan Herman](https://wordpress.org/support/users/eherman24/)
 * (@eherman24)
 * [12 years ago](https://wordpress.org/support/topic/adding-multiple-collapsible-content-blocks/#post-4652444)
 * That would be great. If you’d like I can merge your code into the core plugin
   and add you as an author to the plugin for some credit.
 * Unfortunately I haven’t had the time recently to get back around to updating 
   this plugin , due to work and other side projects. So that would definitely help
   others out.
 *  Plugin Contributor [Matthieu S](https://wordpress.org/support/users/sartmatt/)
 * (@sartmatt)
 * [12 years ago](https://wordpress.org/support/topic/adding-multiple-collapsible-content-blocks/#post-4652445)
 * That’s fine with me. I will send you an e-mail with the first set of changes.
 *  [Mantraagnes](https://wordpress.org/support/users/mantraagnes/)
 * (@mantraagnes)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-multiple-collapsible-content-blocks/#post-4652455)
 * Hello SartMatt,
 * Can you give me the whole code for nested links?
    Thank you!
 * Agnes
 *  Plugin Contributor [Matthieu S](https://wordpress.org/support/users/sartmatt/)
 * (@sartmatt)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-multiple-collapsible-content-blocks/#post-4652456)
 * Hi Agnes,
 * I’ve updated the sample page on my blog to include the source code for the nested
   links : [http://matthieu.sarter.fr/nested-sample/](http://matthieu.sarter.fr/nested-sample/)
 * Evan has integrated the required JavaScript change to the plug-in (version 2.2),
   so you don’t need to modify it.
 * Matthieu
 *  [mauryg](https://wordpress.org/support/users/mauryg/)
 * (@mauryg)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/adding-multiple-collapsible-content-blocks/#post-4652459)
 * Thanks for a great plugin that worked the first time.
    I easily nested
    -  tags with multiple
    -  under each of several parents so I had links to monthly newsletters under
      the parent year and multiple years. The one enhancement I would like to see
      is a way to have the previously expanded hidden text collapse if another parent
      content link (e.g. another year) is clicked. Sort of accordion style. Any 
      thoughts?
 * Maury

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

The topic ‘Adding multiple collapsible content blocks’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/expandcollapse-funk_d5a05c.svg)
 * [Expand + Collapse Funk](https://wordpress.org/plugins/expandcollapse-funk/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/expandcollapse-funk/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/expandcollapse-funk/)
 * [Active Topics](https://wordpress.org/support/plugin/expandcollapse-funk/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/expandcollapse-funk/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/expandcollapse-funk/reviews/)

 * 9 replies
 * 5 participants
 * Last reply from: [mauryg](https://wordpress.org/support/users/mauryg/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/adding-multiple-collapsible-content-blocks/#post-4652459)
 * Status: resolved