WordPress is roughly halfway through the biggest upgrade process that the open-source software has seen since it began. The Gutenberg project and WordPress Block Editor has brought forward so many new terms and features. Keeping up with all the new features and terms can feel intimidating, but we're here to help you get familiar with how to use and develop for where WordPress is going. Let's get clear about which WordPress Blocks and editable regions to use for different purposes.
Recently we looked at Block Patterns to help you speed up your site builds, and you can get these from the Pattern Directory, or create your own. This is an incredible time-saving opportunity to help you establish the layout of a site.
Block Patterns are a collection of predefined blocks that you can insert into posts and pages and then customize with your own content.
When should I use a Block Pattern?
If you want to apply the layout of several blocks, including styling choices, throughout your site in multiple locations, a WordPress block pattern will help. The intention is that content creators can apply your block pattern and swap out the images, text, or other assets to fit the context of where the pattern appears.
See also: Intro to Block Patterns
Do you run promotional information across your site? Perhaps it draws attention to Black Friday sales across your site. But later, you'd like to swap those content blurbs over to whatever the next promotional focus includes. This is where reusable blocks can spare you manually editing each individual instance. Insert a reusable block and modify it later to fit your needs. Each instance will be updated at once.
The Reusable Block allows you to save a block or group of blocks which you can later use in any post or page on your site. If you are often adding the same content to the same block or group of blocks, using the Reusable Block will save you time and effort.
When you make a reusable block, you will now be prompted to name the reusable block from the start. From there, you'll find it in the block inserter across your site.
When should I use a Reusable Block?
Reusable WordPress blocks are ideal when you want to duplicate the exact same content, text and all, throughout your site. Unlike block patterns, the purpose is to not edit the content within the reusable block. You can, but would want to be sure to convert it to regular blocks immediately upon insertion.
At the time of this writing, there is a proposal to rename "reusable blocks." We'll be sure to update you as this evolves.
Templates and Template Parts
Templates are a bit different than reusable blocks or block patterns. A template is intended to be used in more layout areas.
The Template Editor is new feature that allows block editor users to edit and create templates that a page or posts uses. Similar to the post editor, this feature allows you to edit and create content using blocks, including a few new theme blocks. It is only available to content creators who are using a block theme or a classic theme that has opted into using this feature.
We recently looked at how to create a landing page with the WordPress Template Editor. This approach would encompass an entire post or page, deviating from the standard layout.
Template parts, on the other hand, are smaller sections of the site that should be decided once and visible in many locations. For example, a header and footer are ideal template parts that can be created completely with WordPress blocks.
You can create and modify template parts in several ways.
- Using the Site Editor in Block-Based themes while editing areas like "Front Page"
- Using the Site Editor in Block-Based themes to edit only template parts
- Navigating to Appearance > Template parts and selecting the option to add or edit
When should I use a Template Part?
Template parts are ideal for areas of the site that you don't plan to modify often, such as the header and footer of your site. You can also group areas into templates to help you focus on what you are modifying. Before Full Site Editing, Templates and Template Parts would need to be created primarily using code to do so. You can now do all this within the Block Editor experience.
Managing content with the WordPress block editor
You now have more choices for how to create and edit content throughout your site using WordPress blocks. Reusable Blocks help you keep content in sync throughout your site. Block Patterns help you apply the same layout in various regions. Template Parts help you create areas that won't need to be frequently updated but are outside the scope of content like posts and pages.