Spoiler
The Spoiler shortcode for WordPress can be used to display content in an interactive manner, with the option to have it hidden or visible. Check below for example implementations and shortcode documentation:
Spoiler Examples
Spoiler Title
This is the hidden spoiler content.
Spoiler Shortcodes
Shortcode
[x3m-spoiler title="Spoiler Title" open="no" background="#f5f5f5" textcolor="black" radius="10px"]This is the hidden spoiler content.[/x3m-spoiler]Spoiler Documentation
Here are the shortcode option settings available for Spoiler:
| Shortcode Settings | Details |
|---|---|
| title=”Spoiler Title” | This is used to set title on the spoiler container. |
| open=”no” | This is used to set spoiler to be open or not on page load. Available options: – “no” for having the spoiler closed – “yes” for having the spoiler open |
| background=”#f5f5f5″ | This is used to set the background color of the spoiler container.
Color names or HEX color codes can be used to set the desired color. |
| textcolor=”black” | This is used to set the text color for the spoiler title.
Color names or HEX color codes can be used to set the desired color. |
| radius=”10″ | This is used to set corners’ radius of the spoiler container, making them rounder or sharper. |