A shortcode is a small piece of text, wrapped in square brackets, that WordPress swaps out for something more complex — a contact form, a gallery, a pricing table — when the page loads.
What a Shortcode Looks Like
[contact-form-7 id="123"]
Instead of writing out an entire form’s HTML manually, a plugin lets you drop in this short snippet, and WordPress renders the full form automatically wherever it’s placed.
Shortcodes vs Blocks
Before the block editor existed, shortcodes were one of the main ways plugins added complex features to content. Many plugins have since introduced dedicated blocks instead, offering a more visual way to configure the same features without memorizing bracket syntax.
Even so, shortcodes are still widely supported, and some older plugins or specific features still rely on them. WordPress includes a Shortcode block specifically for pasting one directly into the block editor.