How to Create Templates in WordPress (And Customize Them)

Your WordPress theme determines many aspects of your site’s appearance, including post and page layouts. However, you might want to customize the design to suit your specific needs. Therefore, you may be looking for a way to create templates in WordPress.

Fortunately, 😎 with WordPress Full Site Editing (FSE) and the new Site Editor, you can easily access your theme’s templates. Then, you can customize and create new ones using blocks. Even better: you don’t have to touch 🦸 a line of code to do so.

In this post, we’ll give an overview of WordPress page templates and their use cases. Then, we’ll explain how to create and customize these templates using the Full Site Editing features. Let’s get started!

📚 Table of contents:

An introduction to templates in WordPress 🎬

Templates are files that determine the layout and structure of your theme. A template might decide how your specific pages look, such as your 404 page, blog posts, and archives.

You can also get more specific, such as creating a special template that only applies to blog posts in a certain category. 👉 For example, if you publish reviews and tutorials, you might use different templates for those different categories of posts.

Previously, you needed to install a WordPress page builder or use code to create and customize a template. However, with the introduction of Full Site Editing, you can now access and edit templates from your WordPress dashboard.

Additionally, you can adjust individual template parts, which are smaller components within templates. 👉 For example, you can design and edit your website’s footer and header layouts.

Full Site Editing enables you to customize your website layout to match your branding and enhance your user experience (UX). Plus, you can speed up the design process without investing in premium page builders or plugins.

Moreover, editing and creating templates in this way is very user-friendly. You won’t need to touch your theme’s template files and risk breaking your site with incorrect coding. Therefore, even if you’re a WordPress beginner, templates can help you redesign your site in a low-risk way.

Keep in mind 💡 that you currently need to use a WordPress block theme to access Full Site Editing. You’ll also need to have at least WordPress 5.9 on your site.

To find themes that support Full Site Editing, you can use the Full Site Editing feature filter at WordPress.org – click here to go straight to those themes.

How to create templates in WordPress with Full Site Editing 🚧

Depending on your chosen theme, you’ll be able to create new templates for different pages on your WordPress website. For this tutorial, we’ll be working with Twenty Twenty-Two, the current default block theme.

Step 1: Access the Site Editor

Once you’ve installed and activated your block theme, navigate to Appearance > Editor in your WordPress dashboard.

Remember – if you don’t see the Site Editor in your dashboard, that probably means that your current theme isn’t compatible with Full Site Editing.

This will launch the new Site Editor, which displays your home page by default:

The WordPress Site Editor

If you click on the gears icon, you’ll be able to see the current template and its various parts. In our example, the template has a header and footer section:

Viewing a theme template in the WordPress Site Editor.

Now, select the WordPress logo in the top left corner and click on Templates:

How to create templates in WordPress.

Then, select the Add New button in the top right corner. Depending on your theme, you’ll be able to choose from a list of template types, such as Front Page, Author, and Category:

WordPress template types.

If you want to edit your default post template, you can find it in this list (more on this in the next section).

However, if you want to create a custom template for specific post or page types, you’ll need to first open up a new page or post. Then, select Template from the settings panel and click on New:

Creating a new template in WordPress.

You’ll then be prompted to name your template:

Creating a Custom template in WordPress.

Just click on Create to finish the process. You can now start working on your template.

Step 2: Build your template

Once you’ve created and named your new template, you should see a blank page that looks something like below. Or, if you’ve edited an existing template, you’ll see that template’s content:

A blank custom page template in WordPress.

Now it’s just a matter of inserting and customizing blocks to build your page. This process works the same as if you were creating a regular WordPress post or page. However, you’ll get special theme blocks to help you build your template, such as blocks to insert a post’s title or content.

You can also access template parts while building your template. You can do this by selecting Template Part from the list of WordPress blocks and choosing an option from the popup window:

Template parts in a custom WordPress template.

In our example, we’re creating a template for product reviews. So, we’re adding a Header and a Post Title. We’re also adding a Post Excerpt that will summarize the best product for each review and an Author Bio at the bottom of the post.

Keep in mind 💡 that these elements won’t be visible while you’re writing your posts. Since they form your page template, you’ll need to preview the post on the front end to see the template parts.

You can add as many elements as you wish, and you’ll be able to see them listed on the left side of your page. You can also drag and drop them into different positions until you’re happy with the layout:

Custom template in WordPress

When you’re ready, click on Save at the top right. You can follow the same process to create new templates for various pages on your site. However, ⚠ remember to add header and footer sections, since they might not be included by default when working with custom templates.

When you’re working on a post or page, you can select your template from the right-hand menu to apply it to your content:

Selecting post templates.

Keep in mind 💡 that you won’t see all the templates for your theme in this dropdown menu. Some templates can only be applied to content that is generated automatically, such as your Author or Category pages. Therefore, if you want a layout that you can apply to any post or page, you’ll want to stick with the Custom type.

How to customize existing page templates 🎨

You can also customize existing page templates to fit your needs and branding better. This method can be helpful if you’re happy with the available template types but want to tweak their layouts and design.

Step 1: Access the template

To access existing templates, navigate to Appearance > Editor and click on the WordPress icon. Then, select Templates and click on the template you want to edit:

Selecting a template in Full Site editing

As we showed you in the previous section, you can also access some templates while using the Block Editor for posts and pages. Simply open Templates from the settings menu, select the design you want to use, and click on Edit instead of New:

Editing a WordPress template.

Either method will take you to a template editing screen, where you can start changing your template’s layout and appearance. ⚠ Remember that the selection of available templates will vary, depending on your theme.

Step 2: Edit and save the template

Now, you’ll just need to move, add, and delete blocks to customize the existing template. Again, you’ll be able to see all the current blocks in List View, enabling you to reorder them very easily:

Home template

When you’re happy with your changes, click on Save. Your template will now be updated.

ℹ️ Note that this will also update the layout of every page on your website that uses the corresponding template. Therefore, you might like to trial these changes on a WordPress staging site before pushing them live. Otherwise, you risk making minor errors that could confuse your visitors.

Create templates in WordPress today 🏁

Creating new templates with Full Site Editing is one of the easiest ways to customize your website’s appearance. With the release of WordPress 5.9, you can use the new Site Editor to make and edit templates for your block theme.

Do you have any questions about how to create templates in WordPress? Let us know in the comments section below!

Free guide

5 Essential Tips to Speed Up
Your WordPress Site

Reduce your loading time by even 50-80%
just by following simple tips.

Leave a Reply

Your email address will not be published.