Blog · Gutenberg

Templates, Template Parts, and Patterns: What Each One Is For

Jul 12, 2022By Vladimir Mrkela
Share LinkedInX
Templates, Template Parts, and Patterns: What Each One Is For

WordPress sites often combine many pages with layouts and sections that need to feel consistent. Knowing how templates, template parts, and patterns differ helps site owners make changes in the right place—whether they’re updating a page layout, a shared header, or a group of blocks used only once.

Each has a distinct role in shaping a site, and understanding those roles makes it easier to see how they work together.

What WordPress Templates Control

A WordPress template controls the layout WordPress uses to display a page or group of pages. It sets where key elements appear, such as the header, main content, sidebar, and footer.

When you choose a template for a page, you decide how WordPress arranges those areas, not what text you write in each one.

A template determines how WordPress arranges a page’s layout, not the text you add to it.

The Template hierarchy determines which template WordPress uses when several could fit. For example, WordPress may use a specific template for a single post, then fall back to a more general one if that file isn’t available.

This gives you predictable layouts while letting you customize particular page types.

Templates can also display Dynamic content, such as a post title, featured image, or publication date. You can update the content without changing the layout, so check that each template shows the details your visitors need.

How Template Parts Create Reusable Sections

Template parts let you reuse sections like headers and footers across your site. When you update a shared part, the change can appear everywhere it’s used.

Choose template parts for sections you want to keep consistent, and edit them separately when a page needs a different layout.

Reusable Site Sections

When several pages need the same header, footer, or other section, use a template part to build it once and reuse it across templates. You can create a header with your logo, navigation, and Mobile menu, then add it to the templates for your pages and posts.

A footer with contact details or social links can work the same way. Seasonal banners also make useful template parts when you want a promotion to appear in selected page layouts.

To add one, open the site editor, create or choose a template part, and arrange its blocks. Set its content and design, then insert it into the templates that need it.

Check each layout at desktop and mobile sizes. If a section doesn’t fit a page, choose a different template instead of forcing the same part everywhere.

Shared Template Parts

Once you’ve built a template part, you can share it across templates so key sections stay consistent. For example, you might use one header in your home page, blog posts, and archives.

Edit that header once, and the change appears wherever the part is used.

Before sharing a part, check its purpose and scope. A site-wide footer can work across many templates, while a post-specific author section may belong only in post layouts.

Clear template part naming helps you find the right section later, so use labels such as “Site Header” or “Post Author.”

Keep shared component styling in the part itself when you want the same spacing, colors, and layout everywhere. If a template needs a different treatment, create a separate part rather than adding complex exceptions.

Then preview each template to confirm the shared section fits its content.

How WordPress Patterns Add Ready-Made Blocks

If you need a layout quickly, add a pattern to your page to insert a ready-made group of blocks, such as a callout, image-and-text section, or row of columns.

Choose a pattern from the inserter, then replace its sample text and images with your own. Adjust colors, spacing, and alignment to fit your page.

Patterns help you build a clear layout without arranging every block yourself. For example, a service page might start with a heading, short description, and button.

  • You can get a consistent layout in minutes, even when you’re unsure where to begin.
  • You can change each block to match your content, so the result feels like yours.
  • Pattern block locking can protect key blocks from accidental edits.

Some patterns are synchronized, so edits to one instance appear wherever that pattern is used. Check before changing one if you don’t want updates across your site.

These synchronized patterns can save time when shared content needs to stay consistent, but they’re not right for every page. You can also detach one to make a separate version.

Templates vs. Template Parts vs. Patterns

Templates, template parts, and patterns each shape your site in a different way: templates set the layout for a page type, template parts provide reusable sections such as a header or footer, and patterns add ready-made groups of blocks to a page.

Item What you change
Template Overall page structure
Template part Shared section
Pattern Inserted block group

Use a template when you need to adjust a whole layout. Edit a template part when you want the same header or footer to change across multiple layouts. Insert a pattern when you need a useful block arrangement in one spot, then customize its content.

Theme inheritance can affect which templates and parts you can edit, depending on your theme. Check editing permissions before changing shared elements, especially on a team site. If you’re unsure, start with a pattern; it’s easier to adjust without changing the site’s overall structure.

How WordPress Templates Fit Different Page Types

WordPress uses different templates to shape posts, pages, and archives.

You can choose a post template to control how each article appears, while page templates help you arrange content such as a contact page.

Archive templates organize groups of content, like category listings, so visitors can find what they need.

Templates for Posts

When you view a post, WordPress chooses a template based on the type of content and the templates available in your theme. That template controls the post layout, including where your title, featured image, author, and content appear.

It also sets an article structure that helps readers follow each story.

Your theme may use a single template for all posts or offer different options for specific post types. Check the template’s preview before you edit, so you know which posts your changes will affect.

Then adjust the layout to support the content, rather than adding elements just because they’re available.

A clear post template can help you:

  • Find a story’s main point without hunting.
  • Read comfortably on a phone or computer.
  • Feel confident that key details won’t get lost.

Keep shared elements consistent, and give each post enough room to breathe.

Templates for Pages

A page template controls how WordPress arranges a page’s title, content, and other elements. You can choose a layout that suits each page, rather than forcing every page into the same structure. For example, a contact page may need a simple title and form, while a service page may need room for details and a call to action.

Page type Useful layout Elements to include
About Two-column Text and image
Contact Simple Form and details
Service Wide Benefits and call to action

In the editor, open the page settings and select a template if your theme provides options. Page template layouts may hide sidebars or change content width. Landing page templates often remove menus or extra links, keeping attention on one goal. Preview each choice on mobile and desktop, then check that headings, images, and buttons still make sense. If no suitable option appears, ask your developer before changing theme files.

Templates for Archives

Archive templates control how WordPress displays groups of content, such as blog posts by category, tag, author, or date. You can use them to give each archive a clear structure without changing individual posts.

For example, category archives might show a short introduction, followed by post titles, featured images, and dates.

With Archive layouts, choose which details help visitors find what they need. Keep the design consistent across archive types, but adjust headings or descriptions when a group needs context.

A category page about recipes may benefit from a brief note about the dishes, while a date archive may need only a clear month heading.

  • Help visitors feel oriented with a specific archive title.
  • Make older posts easier to find with readable lists.
  • Reduce frustration by showing useful details, not clutter.

Check your archive template on mobile, and confirm pagination lets visitors reach more posts.

When to Use a Template Part

Use a template part when you want to reuse the same section across multiple templates, such as a site header, footer, or post metadata. If you update that shared section, the change appears wherever the part is used.

Choose a template part for content that should stay consistent across pages. For example, you can build navigation headers once, then add the part to your home, archive, and single-post templates.

You can also create footer layouts with the same links, copyright notice, and contact details across your site.

Before you make a part, check whether the section truly needs to repeat. If each page needs different content or structure, keep that section in its template instead.

In the Site Editor, add or create the part, adjust its blocks and styling, then insert it into the templates that need it. Give it a clear name so you can find it later.

When a WordPress Pattern Works Best

Patterns work best when you want to save and reuse a block layout without making it part of a shared template. You can insert a pattern into a page, then change its text, images, or colors without affecting other pages.

Reuse a block layout with a pattern, then tailor its text, images, or colors to each page without affecting others.

Use one when a section needs a consistent starting point but should still fit each page.

  • One time promotional layouts let you build a focused offer without changing your site’s regular structure.
  • Seasonal campaign designs give you a ready-made layout you can adapt for a holiday or event.
  • Reusable callouts, testimonials, or resource sections help you avoid rebuilding familiar layouts.

Choose a pattern when you want speed and flexibility, not automatic updates across every page. If the same content must stay identical throughout your site, a template part may suit you better.

Patterns give you a practical middle ground: repeat the design, then tailor the details wherever you use it.

Where to Create and Edit WordPress Features

Where you create or edit a WordPress feature depends on what it changes. For site-wide layouts, open Appearance, then Editor, and choose Templates or Template Parts.

Your Theme editor access may vary by theme, WordPress version, or user role. If you don’t see the Editor, check that you’re using a block theme or ask an administrator to review your permissions.

For reusable content, select blocks in the page or post editor and use the options menu to create a reusable block. Use a registered block pattern when each inserted layout should be independent.

Browse available patterns in the block inserter, or ask a developer about patterns registered by your theme or plugins.

Before changing anything, confirm you’re editing the right site and feature. Use a draft or preview when possible, then save and check the result on the front end.

This keeps feature management clear and reduces accidental changes.

How Templates, Parts, and Patterns Work Together

Templates set the layout for a type of page, template parts provide shared sections like headers and footers, and patterns help you add groups of blocks to a page.

Together, they form a clear system for building and updating your site.

You can start with a template, such as one for posts, then place a header and footer template part within it. Add a pattern for a callout or contact section where it fits.

This Theme architecture keeps shared design choices consistent while letting each page serve its purpose.

  • Change the header once, and you can update it across the templates that use it.
  • Adjust a pattern’s text or images to match each page without rebuilding its layout.
  • Keep editing workflows simple by checking which element controls the change you need.

Before editing, ask: does this change affect one page, a repeated section, or a reusable block group?

That answer points you to the right tool.

Frequently Asked Questions

Do Templates, Template Parts, and Patterns Require a Block Theme?

No—you don’t need a block theme, because apparently themes enjoy exceptions. With Classic theme support, you can use patterns; hybrid theme compatibility lets you add block templates and template parts, though setup varies by theme.

Can I Export or Import Custom Patterns Between WordPress Sites?

Yes. Patterns registered in a theme or plugin can be transferred by installing that code on another compatible site. You can also copy block markup between editors; check images, links, and styles on the destination site.

How Do I Manage Conflicting Edits to a Shared Template Part?

To resolve conflicting edits, check Edit history review first: WordPress records revisions, so you can compare changes and restore one. Require change approval before publishing, and coordinate with collaborators to prevent overlapping edits and preserve the shared template part’s intended design.

Are Reusable Blocks Updated Everywhere When Edited?

Yes, editing a reusable block updates its instances across the site. By contrast, a block pattern provides independent copies, so editing one inserted copy does not change the others.

Can Plugins Add Templates, Template Parts, or Patterns?

Yes, you can use plugins to add templates, template parts, and patterns. Plugin registered templates can provide layouts, while theme template overrides let you customize them. Check your plugin’s documentation for supported registration options and behavior.

Tags
  • Block patterns
  • Template parts
  • WordPress templates

About the author

Vladimir Mrkela

Vladimir Mrkela

Senior WordPress Developer

I’m a senior WordPress developer and co-founder of Pixel Industry. I’ve spent more than 12 years building websites, custom plugins, and integrations for all kinds of projects. I enjoy working on complex architecture, solving tricky problems, and sharing what I learn along the way.

Ready to build?

Have a WordPress project that needs expert judgment?

Get a Free ConsultationTell us about your project and we will get back to you soon.