Accordion open/close

Hello,

I am wondering how to achieve to get on accordion item closes when the user open another one. Like you can see on the first accordion on this page: http://demo.theme.co/integrity-1/shortcodes/accordion/

I understand this has to do with the id and parent_id, however I did not find out how to make it directly in cornerstone? What is the best way of doing it?

URL (accordion at the bottom of the page): https://e-marketingmix.com/referencement-et-contenu-web/bulletin-de-sante-seo/

Thanks,
Antoine

Hey @Camilletra,

You need to enable starts open, So whenever you open one accordion item it will closes another one.

Hope this helps.

Regards

Hello,

Thanks your for your answer. However, as far as I understood, activating starts open simply makes the accordion item open, but it does not achieve what I want to do, which is:

  • have all the accordion item closed
  • have only one acoordion item as the time, meaning that when you open a second accordion item, the first one closes automatically.

I’ve seen it is possible to achieve this with the id and parent_id, however I did not find out how to make it directly in cornerstone? It works when I edited the code directly in the WP admin, but it then brokes some elements of the page which is build within cornerstone. I am therefore wondering how to achieve this directly in cornerstone.

Thanks,
Antoine

Hi Antoine,

  1. Set starts open to off in all your accordion items.

  1. Turn on link items.

Hope that helps

Thank you. It was actually not that complicated :slight_smile:

You are most welcome. :slight_smile: