A block pattern is a group of blocks you save once and insert again wherever you need it, like a hero section, a call to action or a row of team members. Themes come with patterns of their own, but the most useful ones are often the sections you build for your own site.
There are two ways to make one: save it in the editor, which works on any site, or add it to a theme as a file, so it comes with the theme wherever it’s installed. I’ll go through both, along with the choice between synced and unsynced patterns, which is easy to get wrong.
Create a pattern in the editor
- Build the section in a post, a page or a template. If it’s more than one block, wrap it in a Group block first, so the pattern is one block you can move around.
- Select the blocks, click the three dots in the block toolbar, and choose “Create pattern”.
- Give the pattern a name, and pick one or more categories if you want it easier to find.
- Turn off “Synced” if you want an unsynced pattern, since it’s on by default (more on that below), and click “Add”.

The pattern now shows up in the block inserter, under “Patterns” → “Site patterns”, and you can insert it anywhere on your site. You can also find it in the category you selected, if any.

Synced or unsynced
A synced pattern is the same everywhere it’s used. Change it in one place, and every copy on the site changes with it. That’s what you want for something like a newsletter signup or a contact box that appears on many pages. To edit one, select it and click “Edit original”. Synced patterns can also have overrides, which let you change the text or images of a single copy while the layout stays in sync.
An unsynced pattern is a starting point. Each copy stands on its own once it’s inserted, so you can change it without affecting the others. Since WordPress 7.0, an inserted unsynced pattern opens in content-only mode: you can edit the text, images and links right away, and click “Edit pattern” when you need to change the layout. I go through that mode in how to lock blocks in WordPress.
You can’t switch a pattern between the two after you’ve created it. You can make a copy with the other setting, though, with “Duplicate…” on the Patterns screen, and “Detach” in the toolbar menu turns a single copy of a synced pattern into regular blocks.
Manage your patterns
Go to “Appearance” → “Editor” → “Patterns” to see every pattern on your site: the ones you’ve made under “Site patterns”, and the theme’s in their own categories. Your own patterns can be edited, renamed, duplicated, deleted or exported as a JSON file, which you can bring into another site with “Add Pattern” → “Import pattern from JSON”. In a classic theme, you’ll find the same screen under “Appearance” → “Design” → “Patterns”.
Add a pattern to your theme
Patterns you save in the editor live in your site’s database. To ship a pattern with a theme, add it to the theme’s patterns folder as a PHP file, and WordPress registers it for you. That works in classic and hybrid themes too, not only in block themes.
- Build the pattern in the editor and copy its markup: select the Group block, click the three dots and choose “Copy”.
- Create a file in the theme’s
patternsfolder, likepatterns/hero.php. - Add a header comment, and paste the markup below it:
<?php/** * Title: Hero * Slug: themeslug/hero * Categories: featured, banner * Keywords: intro, header image */?><!-- Paste the block markup here. -->
The title and slug are required. The slug starts with your theme’s slug, so it doesn’t clash with patterns from other themes and plugins. The other fields are optional:
- Categories: where the pattern is listed in the inserter, like
featured,banner,textorfooter. - Keywords: extra words to find it by when someone searches.
- Description: a short explanation of the pattern, which screen readers announce in the inserter.
- Viewport Width: the width, in pixels, the pattern preview is drawn at.
- Inserter: set it to
noto hide the pattern from the inserter, for patterns that are only meant to be used in templates. - Block Types, Post Types and Template Types: where the pattern is offered, which is how starter patterns work (below).
Since the file is PHP, you can make the text translatable with functions like esc_html_e(), and point to images in the theme folder with get_theme_file_uri(), so the pattern works wherever the theme is installed.
If a new pattern file doesn’t show up, it’s probably the pattern cache. Since WordPress 6.4, WordPress remembers a theme’s pattern files until the theme’s version number changes. While you work on a theme, add define( 'WP_DEVELOPMENT_MODE', 'theme' ); to wp-config.php, and new patterns show up right away.
Starter patterns for new pages
A pattern with core/post-content in its block types and page in its post types is a starter pattern. When someone adds a new page, WordPress offers it as a starting point, so they can pick a ready-made About or Contact page instead of a blank one. The same patterns are listed under “Starter content” in the inserter, and the dialog can be turned off with “Show starter patterns” in the editor’s preferences.
/** * Title: About page * Slug: themeslug/page-about * Categories: page * Block Types: core/post-content * Post Types: page */
Use a pattern in a template
Templates and template parts can include a pattern with a single line, which keeps the markup in one place:
<!-- wp:pattern {"slug":"themeslug/hero"} /-->
That’s how many newer themes are built, including Ipsum, where each template is one line that points to a pattern. I go through that in how to customize Ipsum.
Notes
- Patterns in a theme are always unsynced. If you want a synced pattern on every site that uses the theme, the closest thing is a template part.
- Plugins can register patterns too, with
register_block_pattern()on theinithook. - If you use a theme you didn’t make, add patterns to a child theme, so they aren’t lost when the theme updates.