Page templates in WordPress are a great way to add structural variations or highly customized functionality to your website. They are easy to create so newcomers can get started, but they offer enough potential to keep even seasoned professionals busy.
In this article, we’ll take a look at what page templates are and how you can use them to make your website better.
What Is A Page Template?
As I mentioned in the introduction, a page template gives you the ability to deviate from your site’s existing structure in addition to adding new features. Twenty Fourteen includes two great examples: a contributor page and a fullwidth page.
Twenty Fourteen has a page template for contributors.
The contributor page introduces new functionality: the ability to list the authors who have contributed to your website. The full width template alters the structure of the page by removing the sidebar, focusing more on content.
Twenty Eleven also provides two page templates: the showcase template and thesidebar template. The sidebar template gives you the good old sidebar on your page, the showcase page displays sticky posts first and then a list of recent posts.
Premium themes, in particular, like adding numerous page templates to themes to create pixel-perfect contact forms, customizable post listings, highly-customized author lists and more.
Creating A Page Template
Creating a page template is extremely easy. Create any new file in your theme and start the file with a comment block like so:
|Template Name: My Awesome Custom Page|