Classic Accordian Shortcode Not Linking Toggles

I still have a lot of classic accordions on the site, using the V1 shortcode. After the update, the toggles aren’t linked anymore. Now this only happens with the shortcode, but i have several cases where I can’t use the draggable elements. Any Ideas?

You can see it at https://manflowyoga.com/zz-testing/ and here’s a sampling of the shortcode I’m using:

[accordion id="p1w1" class="thisWeek"][accordion_item title="Day 1: Program Overview & Fitness Assessment" parent_id="p1w1" open="true"]Hello [/accordion_item]

[accordion_item title="Day 2: Wrist Mobility & Strength" parent_id="p1w1"]Hello[/accordion_item][/accordion]

Hello There,

It is working when I check that page: https://screencast-o-matic.com/watch/cFe2QhD3vv
Either it is not working on your end and you need to clear cache, or I didn’t understand which toggles is not linked anymore. Please clarify.

I mean that only one is supposed to be open at a time. when opening one the other should close.

Hi There,

Yes, this seems to be a bug with the Accordion shortcode only as the Classic and V2 Accordion are working fine.

I’ll submit this bug to our issue tracker, but we cannot provide an ETA when will this fix. I recommend that you recreate your accordions using the V2 Accordion element.

Would you mind to clarify what do you mean you can’t use the draggable elements? what browser you’re using? can you try a different browser, maybe the latest Chrome or Firefox?

Thanks,

When I say “can’t use the draggable elements” I’m saying that i use the shortcodes in places where I cannot (or where it would be completely unwieldy) use the cornerstone builder. The shortcodes generally work great placed within a plain text field. it’s just after the update that, I guess, they are being parsed incorrectly.

Which really really sucks.

Hello There,

Your shortcode will be parse incorrectly because it is incorrect. The correct one should be:

[accordion id="p1w1" class="thisWeek"][accordion_item title="Day 1: Program Overview & Fitness Assessment" parent_id="p1w1" open="true"]Hello [/accordion_item][accordion_item title="Day 2: Wrist Mobility & Strength" parent_id="p1w1"]Hello[/accordion_item][/accordion]

No line breaks in between the shortcodes so that it will be rendered correctly. Once there is a line break, WordPress and text element’s wp_autop() function will convert it in to a <p></p> tag which would invalid the output of the accordion.

Hope this helps.

I have attempted putting it all on one line. Same problem. Plus in the example page I provided I was using the raw content element, which is exempt from autop.

Hi there,

From what theme and cornerstone version did you upgrade your site? The shortcode no longer use the id="p1w1" and parent_id="p1w1" combination which makes the accordion open single item at a time only. It’s now link="true", example,

[x_accordion link="true" ][x_accordion_item title="Accordion Item 1" open="true"]Add some content to your accordion item here.[/x_accordion_item][x_accordion_item title="Accordion Item 2" open="false"]Add some content to your accordion item here.[/x_accordion_item][/x_accordion]

It’s a classic accordion shortcode, and it’s not just because of the recent updates. Could you try changing them in similar format?

Thanks!

THANK YOU! This worked. I was basically going off of the instructions at http://demo.theme.co/renew-1/shortcodes/accordion/ which still say to use the id/parent_id.

Thanks Again!

Glad it worked.

Cheers!

Thank you. I also used the outdated instructions online and was confused for a minute.
http://demo.theme.co/integrity-1/shortcodes/accordion/

Hi there,

Yes, it was from older version. We’ll have to update our demos :slight_smile:

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.