Use the expand shortcode to create accordions. This shortcode is designed to replace third-party plugins that provide accordion functionality.
[expand title="How it works"]
Wrap the content you want to hide here.
[/expand]
Consecutive accordions will stack nicely.
To force an accordion to display as open, use open=”true” as a parameter.
Govintra also supports embedded layers of accordions, up to 3 nested levels inside an expand block. Use expandsub1 to expandsub3. Levels must be coded hierarchically; expandsub2 must be within a expandsub1 block, expandsub3 must be within a expandsub2 block. Each of these tags works on its own, but to get a nested accordion they must be opened and closed in order — expandsub2 inside expandsub1, expandsub3 inside expandsub2 — and each closing tag must match its opening tag; if a tag is not closed, or the closing tag does not match, that accordion is not created: its content shows as ordinary text and any stray closing tag appears on the page as text. For example:
Top level
– Level 1
– Level 1
– – Level 2
– – – Level 3
– – Level 2
– Level 1
[expand title="Top level accordion"]
[expandsub1 title="Level 1 accordion"]
This accordion is within the top level accordion
[/expandsub1]
[expandsub1 title="Level 1 accordion"]
This accordion is within the top level accordion
[/expandsub1]
[expandsub1 title="Level 1 accordion"]
[expandsub2 title="Level 2 accordion within level 1 accordion"]
This accordion is within the level 1 accordion
[/expandsub2]
[expandsub2 title="Level 2 accordion within level 1 accordion"]
This accordion is within the level 1 accordion
[/expandsub2]
[/expandsub1]
[/expand]
