Question about accordions in a theme

When using Accordions in a theme that creates collapsible elements, triggererd on a -tag, is there a way to close an accordion-element as well in an article?

Here’s the use case:

If I create a text like this:

<h1>Hello this is a test…</h1>

<h3> this is the first accordion</h3>

<p>Text for first accordion</p>

<h3>This is the second accordion</h3>

<p>This is the content for the second accordion</p>

<p>And this is some text I want to display outside of the second accordion!</p>

So the question is, how can I close the content for an accordion, without the entire text after the accordion being added to the accordion itself.

I’ve tried adding an empty -tag before the text I want outside of the accordion, but this results in a new accordion-element without text in the header.

To end an accordion, you can use an empty header of a higher level. Additionally, you need to use a header tag that is not selected to generate accordions.

In your example h3 is accordion, you can use empty h1 or h2 as long as they are not selected to generate accordions.

2 Likes