Shortcode – core/shortcode

Insert additional custom elements with a WordPress shortcode.

Use the Shortcode block to write shortcodes which produce blocks.

Screenshot

Example

This shortcode displays the current version of WordPress and PHP being run on the server.

[wp v p]

WordPress 6.4.1. PHP: 8.0.30


Notes

  • Suitable for shortcodes which produce blocks.
  • May fail to cater for new lines in block content.
  • The shortcodes are not rendered in the editor but are invoked when the post is viewed.

Inline shortcodes

You can use inline shortcodes and get the same results with / without the shortcode block.

[bw_admin] is the admin user for [bw_company].

Inside a shortcode block

herb is the admin user for WP-a2z.

Inside a paragraph block

herb is the admin user for WP-a2z.