Shortcode block lets you embed files or create objects that would normally require lots of complicated, ugly methods or code snippets in a single line.

Adding block

To add a shortcode, click on the Block Inserter icon and select the “Shortcode” block.

add-shortcode-block
Inserting shortcode block

Alternatively, you can start typing /shortcode in a new paragraph block, then press enter.

Editing block

Once you add the shortcode block, you may type your shortcode into the box provided as shown in the example below.

view-shortcode-block
Shortcode block in the editor

Block interface

Although most blocks come with unique and block-specific controls, the shortcode block is pretty straightforward, and only has the “More Options” control available to config.

more-options-shortcode-block
More Options menu in shortcode block

Clicking on the ⚙ cog icon next to the publish button will toggle the visibility of this panel.

sidebar-settings-shortcode-block
The shortcode block settings in the sidebar

While most blocks have specific options in the editor sidebar in addition to the options found in the block toolbar, the custom HTML block does not have extra options to alter.

Last updated: 1 month ago

We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies ― Learn more

Accept