When you create WordPress page templates, you can more easily customize your website. Instead of spending a ton of time creating each individual page, you can create a few base designs, and just switch out the content.
WordPress Full Site Editing makes it easy to design page templates without much technical expertise. Using the Site Editor, you can customize new templates and even build template parts without touching any code. This way, you can modify your site to meet your specific needs.
In this post, we’ll explain what page templates are and how they can benefit your WordPress website. Then, we’ll show you how to create them using Full Site Editing.
An Introduction to WordPress Full Site Editing
You may already know that you can use WordPress themes to change the appearance of your website. A collection of design settings and code make up each distinct theme.
You may also be familiar with blocks, which are individual elements — like headlines, images, paragraphs, and columns — that you can use to design your entire website, from pages and posts to headers and footers.
Although WordPress themes are very versatile, there may be times you want to stretch beyond the built-in design settings. A great way to do this is by modifying your theme’s page templates. You can do this as part of Full Site Editing using a tool called the Site Editor.
With a page template, you can build a new layout that provides a unique design that you can apply to one page or a group of pages. The only limit to page templates is your imagination. Whether you need a new layout for your Services pages, want to change the look of all your blog posts, or need a custom landing page, a page template can help bring your ideas to life.
Plus, after designing a page template for your website, you can reuse it whenever you want. This can save time when you’re creating new content. Instead of building every page from scratch, you can choose a template to instantly use a layout.
Remember: A page template can be used for any number of pages. It is not the page itself. It is a design and layout that displays a page’s content in a specific way. If a template has been assigned to multiple pages, then editing the template will apply the changes across all the pages that use the template.
How to Create WordPress Page Templates
Now that you know about page templates and their benefits, you’ll probably want to start designing one for your website! In this guide, we’ll show you how to do this in WordPress using the Full Site Editor.
In the next sections you’ll discover how to:
- Add a new page template to a block theme.
- Use blocks and patterns to create the design and layout you want, without having to code.
- Use the same techniques to create template parts, such as headers and footers, and then insert them into your page templates.
- Easily apply your new template to any page on your site.
Step 1: Add a New Page Template in the Post Editor
First, you’ll need to make sure you’re using a block theme, which will enable you to access the Template Editor. Please note that changing themes will affect the design and layout of your current site.
To download a block theme, open your WordPress dashboard. Go to Appearance → Themes. Here, you’ll see a list of all the themes you have installed on your site.
Next, click on Add New. At the top of this page, select Feature Filter.
From the list of feature tags, check the box next to Full Site Editing. After this, click on Apply Filters. This will display a list of free block themes.
Once you find a theme you like, simply install and activate it. Then, add a new post or page. Now, find the Template section in your editor. It should be at the bottom of your right sidebar.
To create a new template, click on New, just below the dropdown menu. Then, in the pop-up window, name the template.
After you select Create, this will open the Template Editor. Similar to how you would build a post or page, you can design the template using blocks.
You can also browse the Pattern Library and insert a pre-designed layout. If you’re building a photo gallery, you could choose from the Gallery patterns.
When you’re finished designing your page layout, click Publish.
If you’re happy with these edits, select Save. Now you’ve created your first page template!
Step 2: Customize Page Templates in the Site Editor
Now you’re ready to customize the template! If you’re most comfortable using the Post and Page Editor, you can use it to create and edit page templates. But if you’re ready to try something new, a simpler alternative is to edit these templates in the Site Editor.
Go to Appearance → Editor (beta). This will automatically open your homepage template.
Next, click on the WordPress logo in the top left corner. Then, find Templates.
If you completed step one in our guide, when you open the Templates page, you’ll see the one that you just created. Depending on your theme, there will also be a list of some default templates.
Select the template that you want to edit. Then, you can add blocks or patterns anywhere on the page.
You might want to insert some basic blocks, like paragraphs, lists, headings, or images. You can also select Browse all then scroll down to the Theme section.
With theme blocks, you can add useful features like a site logo, featured image, or navigation block.
By clicking on the List View, you can see the structure of your page template. You can even drag and drop blocks to rearrange them.
After adding all the blocks you need, you can click on each one to customize its settings. You can adjust color, text size, alignment, and more.
Whatever changes you make, you can view how they will look on the front end. When you’re happy with your template, simply click Save.
Step 3: Create Template Parts
As you browse the Site Editor, you might notice a section labeled Template Parts. Essentially, template parts are smaller, structural units within a page template.
If you want to display a piece of content on multiple pages of your website, you might consider creating template parts. They’re typically used for headers and footers, but you can also build a call to action, logo, or featured post section. You can turn virtually any set of blocks within a template into a reusable part.
To create a new template part, open your Site Editor. Then find Template Parts in the left panel.
Your block theme will likely have a set of default template parts for you to use. You can either select one of these existing parts or click Add New. When creating a custom template part, give it a name and select the Area it will reside in. Then, click on Create.
Now, you can add as many blocks and patterns as you’d like. This will depend on how you plan to use the template part. For example, if you want a reusable ‘Featured Posts’ part, you can insert a Related posts pattern.
After you customize your template part, click Save. To further speed up your workflow, you can now add this template part to one of your page templates.
To do this, open a template and insert the Template Part block.
Keep in mind, you can also use the Start blank option, but we’re going to select Choose so we can try out our new template part. Next, pick your template part from the list of options.
This will automatically insert the template part. You can repeat this process for any of your page templates.
When you’re happy with how your template looks, select Save.
Use WordPress Page Templates for Custom Web Design
After you make WordPress page templates and template parts, you can reuse them to instantly implement specific designs.
Any page on your site can use your new template. You simply need to select the template from a list while editing the page, as shown below.
This can be the key to simplifying your content creation process. Plus, Full Site Editing enables you to easily build these features without code.
WordPress.com Gives You More
Our designers create beautiful block-based themes, with Full Site Editing built-in. Curious to know what some of them look like?