How To Use Shortcodes
Shortcodes are like the grandparents of blocks. They are a little more manual and slightly closer to writing code, but extremely convenient and powerful for adding content to locations where blocks aren't yet available, like inside Customizer settings or block Custom Content areas.
How To Use
Once you understand the fundamentals of how to use a shortcode, they are very easy to use and customize with the available parameters.
- A shortcode requires opening and closing brackets around the shortcode name.
- All parameters need to be separated by a space and should include double (not curly) quotes around the parameter value.
[my_shortcode thing="true" another="123"]
- See the docs for the expected and available parameters. Some are true/false, others are integers, and some can also allow multiple values by comma-separating the values.
[my_shortcode thing="true" another="123" multiple_example="123, 456"]