Accordions
To hide or show text in a retractable panel, use the [accordion]
shortcode. You can switch between having a single open item or multiple open items by setting the collapse
parameter to true or false.
Single open item
How can I find happiness?
Are you available for freelance work?
Is there documentation available for this theme?
[accordion collapse="true"] [accordion_panel title="title"]your content here[/accordion_panel] [accordion_panel title="title"]your content here[/accordion_panel] [/accordion]
Multiple open items
How can I find happiness?
Are you available for freelance work?
Is there documentation available for this theme?
[accordion collapse="false"] [accordion_panel title="title"]your content here[/accordion_panel] [accordion_panel title="title"]your content here[/accordion_panel] [/accordion]
Toggles
To hide or show text in a retractable panel, use the [toggle]
shortcode. A good example of how the toggles can be used is in createing a Frequently Asked Question section by using multiple toggles. To have the toggle open on page load, set the 'open' option to true
; To have the toggle closed by default, set the 'open' option to false
open toggle
How can I find happiness?
[toggle open="true" title="Your toggle title here"]Your toggle content here[/toggle]
closed toggle
How can I find happiness?
[toggle open="false" title="Your toggle title here"]Your toggle content here[/toggle]
Toggle with code
You can also use the toggles to show/hide code snippets by wrapping the content with <code>
show code
<ul> <li class="uk-nav-header uk-navbar-nav-subtitle">Menu Heading<div>Subtitle possible</div></li> <li><a href="#">[icon style="icon-envelope-o"/] Menu Icon</a></li> <li><a href="#">[icon style="icon-heart-o"/] Another Menu item</a></li> <li class="uk-nav-divider"></li> </ul>
[toggle_code open="false" title="Show code"]Your toggle code here[/toggle_code]