Creating a Custom Page Template in WordPress
In this tutorial, we will create a custom page template in WordPress. After duplicating the Twenty Fourteen theme and calling it “Twenty Fourteen Custom”, we make a copy of the default page template page.php and call it page-twocolumn.php …
We added some custom template code to page-twocolumns.php as shown above. This code will render two columns below the normal post.
But the key in creating a custom template is at the top of the page-twocolumns.php file. We have to put “Template Name” and the name of the custom template in the commented section as shown here …
That way, when you go create a new page, you will be able to select the custom template from the template selection droplist…
You can only have custom template for pages, not posts. After selecting Two Columns for the template, we publish the page can see the render of the code in our custom template ….