How to Create a New Page Template in WordPress With 3 Easy Methods

Designing a website can be fun. Although you can customize your site’s appearance by editing your theme, this will likely create global changes to your design. Therefore, you might be looking for an easy way to create individual pages with specific features.

This is where page templates come in. These enable you to customize your pages without modifying your theme. Templates give you more control over your design while helping you save time. Plus, you won’t need to learn any coding skills to create them. 

In this post, we’ll explain what page templates are and why you might want to use them. Then, we’ll show you how to create and customize templates in WordPress. Let’s get started!

An Introduction to Page Templates (And Why You Might Want to Use Them)

When you start building a website in WordPress, using a theme can help you achieve a cohesive design. You can then use Full Site Editing to make global changes to your theme. 

However, if you want to customize the appearance of individual pages, you’ll need to create page templates. While your theme controls your site-wide design, templates help with individual page structure.

You might want a particular page on your website to look very different from the rest of your content. By setting up a new template, you can create a unique page. 

For instance, you might want to build a 404 error page that aligns with your branding:

Using page templates, you can also display widgets that aren’t shown on other pages. Alternatively, you could set up a full-width layout on a particular page or display items in a grid:

Usually, WordPress block themes come with some page templates. Here are some common examples:

  • Default template
  • Full-width template
  • Grid template

Templates can also help you streamline your content creation process. After creating all the templates that you need, you can apply them across different pages. This way, you won’t have to edit every page individually.

3 Ways to Create a New Page Template in WordPress

Now that you know a bit more about page templates and how they work, let’s look at how to create them in WordPress. The methods discussed below will help you customize your web design to meet your specific needs. 

1. Add a Page Template in the Post Editor

One of the easiest ways to add a page template in WordPress is through the Post Editor. If you’re not used to Full Site Editing yet, this can be a simpler alternative. Plus, you can create templates as you develop new content.

To get started, navigate to your WordPress dashboard and click on Posts > Add New. For this tutorial, we’ll be designing a template on a new page. However, you’ll also be able to edit the template after creating the page.

Next, go to the Post settings on the right-hand side of the page, and find the Template section:

You can use the dropdown menu to choose an existing page template. If you need to build one from scratch, click on New. This will enable you to create a custom template:

Give the template a name that describes its purpose. For example, a custom 404 error page template can be named “404”.

Then, click on Create. This will open the Template Editor, where you can add blocks to build your custom page:

When you’re finished, click on the Publish button. Before WordPress saves your new template, you’ll be able to view which pages on your site will be affected:

If you’re happy with these changes, click on Save. That’s it – you’ve created your first page template in WordPress!

2. Customize Templates in the Site Editor

If you’re using a block-based theme on your site, you can also add and edit page templates in the Site Editor. To download a theme that supports this feature, go to Appearance > Themes. Then, narrow down your search with a Full Site Editing filter:

After you activate one of these themes, you’ll get access to the Site Editor. Simply navigate to Appearance > Editor (beta).

This will automatically open your homepage template. If you want to switch to a different template, click on the WordPress icon in the top left corner:

Here, you’ll see two different options: Templates and Template Parts. When you click on the first one, you can view all the default templates included with your theme:

Click on the template that you want to edit. This will open the Template Editor:

Then, you can edit the template by adding new blocks. For example, you might want to insert a navigation block to make your content easy to find:

You can also open the List View to reorganize the pages. Simply drag and drop different elements to rearrange them:

When you’re ready, click on Save. Keep in mind that you can clear your customizations at any time by navigating to the Templates page in the Site Editor. 

3. Create New Template Parts

With Full Site Editing, you can also customize specific sections of your page templates. These are called template parts.

By creating a new template part, you can save it for future use. For instance, you might have a Call To Action (CTA) on all of your blog posts. When you create a template part for this feature, you can simply implement it using a template part block.

To start creating template parts, go to the Site Editor. Then, click on Template Parts:

As with templates, your theme will automatically provide some options for you. If you’re using the Twenty Twenty-Two theme, you’ll find template parts for headers and footers.

Since these options are fairly limited, you can create a new template part. To do this, click on Add New in the top right corner. 

Next, you’ll need to name your template part. Then, choose the area you want to place it in. The three options are General, Header, and Footer:

After you select Create, you can start editing your template part. For example, you can add basic blocks such as paragraphs, headings, or quotes. 

If you scroll down to the Theme section, you can insert specific features related to your theme, such as post excerpts and query loops:

When you’re ready, click on Save. Now, when you’re editing your templates, you can add a Template Part block to include the elements you’ve created: 

This can be a simple way to insert headers, footers, or other features on your website. Once you create a template part, you can reuse it on any of your page templates.

Now, Try Creating Your Own Page Templates

Many WordPress themes come with default page templates for your homepage, posts, and 404 error pages. However, these options might not completely meet the needs of your website. To build a unique design, you’ll need to create your own page templates.

To review, here are the three methods you can use to design page templates in WordPress:

  1. Add a page template in the Post Editor.
  2. Customize templates in the Site Editor.
  3. Create new template parts.

Best of all, creating page templates is relatively easy to do. Go forth and create some of your own!

ABOUT THE AUTHOR

The WordPress.com Team

At WordPress.com, our mission is to democratize publishing one website at a time. Create a free website or build a blog with ease on WordPress.com. Dozens of free, customizable, mobile-ready designs and themes.

More by The WordPress.com Team

%d bloggers like this: