The Template Part block is an essential tool in the WordPress block editor that allows users to create and display a consistent section of their website on multiple pages. This feature is particularly useful for repeated elements across the website, such as headers, footers, sidebars, comments, and post meta. Users can also create custom Template Parts that can be reused throughout their website’s layout, providing a seamless design experience. However, it’s important to note that this feature is only compatible with themes supporting template editing, so users should verify their chosen theme is compatible before using this feature.
In the WordPress block editor using Site Editor, Template Parts such as Header, Footer, Comment, Post Meta, and Sidebar are blocks that allow users to create consistent and reusable sections of their website.
- The Header Template Part block is typically located at the top of the website. Usually, it contains the site logo, navigation menu, and other essential elements that should be displayed on all website pages.
- The Footer Template Part block is usually located at the bottom of the website. It includes copyright notices, links to social media accounts, and other relevant information that should be displayed on all website pages.
- The Comment Template Part block displays information such as the author’s name, publication date, and any comments left by visitors to the website.
- The Post Meta Template Part block displays additional information about a blog post, such as the publication date, author’s name, category, and tags.
- The Sidebar Template Part block is often used to display information such as recent posts, categories, tags, and other widgets relevant to the page’s content.
Using Template Parts in the WordPress block editor allows users to create a consistent look and feel throughout their website and save time by not having to recreate the same elements on multiple pages.
Tip
It’s important to remember that the specific options may vary based on the version of WordPress, theme, and plugin you are using.
1
Open the Full Site Editor and navigate to the “Template Parts” section.
2
In the sidebar, you can see a list of template parts available for the theme. If you want to add new ones, click the “Add New” button in the sidebar’s top right corner.
3
A new window will appear when you click on it, showing a list of a few template parts areas you can create.
4
We’ll be creating a General template part for this tutorial. By default, the General option is already selected. You must type in a name for your template part and click the Create button.
5
After opening the template part, the screen will display a blank space with the name of your template part at the center and top of the interface. To begin building your template part, click on the “+” symbol in the top left corner.
6
You can choose from various blocks or patterns to create your template section. The Pricing Pattern shown in the screenshot below is an example of one such pattern. It includes a columns block with three columns.
7
To save your progress, click the Save button in the screen’s upper right-hand corner.
8
You have now finished creating your template section. Viewing the list of template sections, you will notice that the section you just created has been added.
Leave a Reply