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.

If you want to use a shortcode in the block editor, first add a Shortcode block or HTML block to the page.
  1. A shortcode requires opening and closing brackets around the shortcode name.

  2. All parameters need to be separated by a space and should include double (not curly) quotes around the parameter value.

    [my_shortcode thing="true"]
    [my_shortcode thing="true" another="123"]
  3. 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"]
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us