The toggle shortcode allows you to display collapsing content. The options for this shortcode are shown below. See examples here.

OptionDefaultExampleDescription
width(empty)width="200px"Set the CSS width of the toggle.
styleboxstyle="plain full"The style of the toggle:

  • box = Boxed
  • plain inline = Underlined (text width)
  • plain full = Underlined (full width)
destroy0destroy="1"Hide the trigger when clicked.
size(empty)size="med"There are 3 overall sizes for the toggle:

  • (empty) = Small
  • med = Medium
  • lrg = Large

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.

Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy