NewThe WP Tutoring WordPress training platform is live — on demand video courses and interactive WordPress lessons. Free lessons included.Start free
Helping site owners learn WordPress since 2012 · (844) WP-TUTOR
Block Editor

Adding Shortcodes in Gutenberg (the Block Editor)

Add any WordPress shortcode with the Shortcode block, step by step: insert the block, paste the shortcode, and check it renders — with a real example.

WT
WP Tutoring TeamWordPress Instructors
Updated Aug 3, 2026
3 min read

Shortcodes are small bracketed tags — like [contact-form-7 id="4"] — that tell WordPress to output something bigger in their place: a form, a gallery, a table. Plugins have used them for years, and the block editor has a dedicated Shortcode block for dropping them into any post or page.

This tutorial was fully re-shot in August 2026 on WordPress 7.0, so the screenshots match what you'll actually see.

TL;DR The 30-second version
  • Add the Shortcode block (search "shortcode" in the block inserter).
  • Paste or type the full shortcode, brackets included.
  • The editor shows the tag, not the result — always check the published page.
  • If a plugin offers its own block instead, prefer the block.

What you need first

A shortcode to add. Every shortcode comes from somewhere — a plugin, your theme, or WordPress core — and the plugin that provides it must be installed and active. In the example below we use the contact form shortcode that Contact Form 7 generates. If you're new to plugins, start with our installing a WordPress plugin tutorial.

Open the post or page and the block inserter

Edit the post or page where the shortcode should appear (or create a new one). Click the blue + button in the top-left corner to open the block inserter, and type shortcode in the search box. The Shortcode block — its icon is [/] — appears immediately.

Searching for the Shortcode block in the WordPress block inserter

Insert the Shortcode block

Click the Shortcode block to add it at your cursor position. You get a labeled box with an empty text field — this is where the shortcode goes. Nothing renders here yet; that's normal.

The empty Shortcode block, ready for input

Type or paste the shortcode

Enter the complete shortcode exactly as the plugin gave it to you, including the square brackets and any attributes. Here we're embedding a Contact Form 7 form:

A Contact Form 7 shortcode typed into the Shortcode block

Most form, gallery, and table plugins show you the exact shortcode to copy on their own settings screen — copy it from there rather than typing it by hand.

Publish (or update) the post

Click Publish in the top-right corner and confirm. The editor deliberately shows the shortcode as text, so don't worry that it doesn't look like a form yet.

The publish confirmation panel with a link to view the post

Check the live page

Open the published post — the shortcode is replaced by its real output. Our example renders the full contact form:

The published page showing the contact form the shortcode produced

If you see the bracketed text instead of the output, the plugin providing the shortcode is inactive or the shortcode has a typo — see the FAQ below.

Shortcode or block? A 2026 reality check

Shortcodes aren't going anywhere, but they are gradually becoming the fallback rather than the front door. Most major plugins now register their own blocks — a dedicated block previews the actual content inside the editor and exposes its settings in the sidebar. So before reaching for the Shortcode block, search the inserter for the plugin's name. Use the Shortcode block when no dedicated block exists, or when documentation hands you a raw shortcode.

Shortcode not cooperating?

Misbehaving shortcodes are a classic "15-minute fix with a second pair of eyes." We sort out exactly this kind of thing live on your own site in a one-on-one tutoring session.

Keep learning

Frequently asked questions

Why is my shortcode showing as plain text instead of rendering?
Almost always the plugin that provides the shortcode is deactivated, or the shortcode is misspelled. WordPress renders unknown shortcodes as literal text. Check Plugins → Installed Plugins first, then compare the shortcode character-for-character against the plugin's documentation.
Do shortcodes still work in the block editor?
Yes. The Shortcode block exists exactly for this, and shortcodes pasted into a paragraph block are rendered too. Many plugins now also ship a dedicated block — if one exists, the block usually gives you a live preview and settings the raw shortcode can't.
Can I put a shortcode in a widget area or template?
Yes. Block-based widget areas and the Site Editor both accept the same Shortcode block, so the steps in this tutorial work there as well.
WT

WP Tutoring Team

WordPress Instructors

We’ve been teaching WordPress to individuals and businesses since 2013 — through step-by-step tutorials, video courses, and 1-on-1 tutoring sessions.

Leave a comment

Comments are reviewed before they appear.

Get our free WordPress starter guide

Join thousands of site owners and get step-by-step WordPress tutorials in your inbox, plus printable cheat sheets.

Beginner-friendly, no jargon
Printable cheat sheets & checklists
Unsubscribe anytime

Request your session

We’ll reply quickly — usually the same business day.

By using this form you agree with the storage and handling of your data by this site.

Access our WordPress Training Academy videos

Step-by-step video courses covering the block editor, themes, plugins, and everything you need to build a site you’re proud of. Free lessons included — browse the full library before you sign up for anything.

Explore the Academy