Shortcode
Quick Definition
A shortcode is a small piece of code in square brackets that you place in a WordPress post or page to embed dynamic content — like a gallery, a contact form, or a video player.
What Is a Shortcode?
A shortcode is a macro wrapped in square brackets that WordPress replaces with dynamic content. Introduced in WordPress 2.5. Syntax: [shortcode] or [shortcode attr="value"].
6 built-in: [gallery], [caption], [audio], [video], [playlist], [embed].
Shortcodes in Practice
Most come from plugins. Example: [wpforms id="123"] displays a form. Developers register with add_shortcode(). In the Block Editor, use the Shortcode block.
With the rise of blocks, many plugins now offer native blocks instead. But shortcodes still work everywhere.
Why It Matters
Embed complex functionality with zero coding. See our plugins guide and contact form plugins.