Back to Support Content and Media Blocks Shortcode Block

Shortcode Block

shortcode is a WordPress-specific code that lets you do nifty things with very little effort. Shortcodes can embed files or create objects that would normally require lots of complicated, ugly code in just one line. Shortcode = code shortcut!

Every shortcode is wrapped in two square brackets [ ]. You can add shortcodes to any page or post by first inserting the Shortcode block. This guide will show you how!

Add the Shortcode Block

To add the Shortcode block, click on the + Block Inserter icon and search for “shortcode”. Click it to add the block to the post or page.

Alternatively, you can type your shortcode inside two square brackets. For example, the shortcode can be used to embed any public YouTube video into any page or post.

Or type /shortcode and press enter:

Shortcode Block Slash Command
Add a Shortcode block with a slash command.

For more, visit our detailed instructions on adding blocks.

Write Your Shortcode

When you first add the Shortcode block into your post or page, it will look like this:

Shortcode block without code

Type your shortcode into the box provided or paste it from the available shortcodes. In this example, the shortcode is added in the box to display posts by date.

Shortcode block with shortcode
Shortcode to display posts by date

In your post or page preview, the posts will be displayed in order of date:

Posts displayed by date

Available Shortcodes

Below you’ll find a list of all the shortcodes available on your WordPress.com site. In addition, many third-party plugins (which you can install on the WordPress.com Business and Commerce plans or our legacy Pro plan) use shortcodes too – consult your plugins documentation to learn about that plugin’s shortcodes.

Video
Audio
Images and Documents
Miscellaneous

Useful shortcodes for adding a blog archive index, contact form, polls, and more.

Was this guide helpful for you?

Not quite what you're looking for? Get Help!

Copied to clipboard!