Custom Page Templates – WordPress

It has happened to all of us.  We pick out a great theme, we are zooming along and then we realize that what we want to do with a page was not built in to the attribute template selection from the dropdown menu.  In this article, I will walk you through how to make a custom page template that will appear in your dropdown.

Custom Page Template

One goal of this blog is to provide you with the quickest route and save you time.  This is often achieved by me spending a ton of time to get to that route.  With that said, this is one of those moments.  Therefore, I will provide you with the quickest route that I have found at this time.

Today, I experienced this issue when using a plugin that imports Tweets from Twitter into a special post type called “tweets”.  I wanted to have a page just for the tweets separate from the blog.  What I needed to do was create a custom page template so that it would appear as a layout in the attribute dropdown menu that I could select for a custom page layout.   Here are the steps to achieve this.

Inside your live theme, create a folder called /page-templates.

WordPress will understand that this means that pages within this folder will appear in the Page Attributes – Templates dropdown in addition to any other pages that already appear in the dropdown.

I spent a lot of time trying to write this page from scratch but discovered that it is a quicker method to copy page.php and place it in this folder.  Then, customize it as you see fit and rename it.

Once you have customized your new page.php, rename it as you see fit.  In my scenario, I renamed it tweets.php.  Now, when you make a new page, the Attribute dropdown menu which displays the templates you can select will now show the new custom page template that you have created.