The toggle shortcode allows you to display collapsing content. The options for this shortcode are shown below. See examples here.
Option | Default | Example | Description |
---|---|---|---|
width | (empty) | width="200px" | Set the CSS width of the toggle. |
style | box | style="plain full" | The style of the toggle:
|
destroy | 0 | destroy="1" | Hide the trigger when clicked. |
size | (empty) | size="med" | There are 3 overall sizes for the toggle:
|
Example
[toggle width="400px"] [toggle_content title="Toggle 1 title"]Toggle 1 content[/toggle_content] [toggle_content title="Toggle 2 title"]Toggle 2 content[/toggle_content] [/toggle]
Nested Toggle shortcodes
Nested Toggle shortcodes will not work using the same toggle
shortcode as the outer toggle, due to limitations of the WordPress shortcode parsing system. However, we have added the duplicate shortcodes toggle1
, toggle2
, toggle3
and toggle4
, and toggle_content1
, toggle_content2
, toggle_content3
and toggle_content4
that you can use for the inner toggles. Only use one shortcode of each type within a nested group.