WordPress Missing Template Option on New Page Screen

I had a case where I went to add a new page to a blog I had made a couple years ago for a client of mine and the template option was not there. Hmm? very curious I thought, so I Googled it and while I was looking for a page to find the answer to my dilemma, it occurred to me that WordPress might only show the option if there are indeed custom page templates in the theme you are using. That was in fact the secret to this problem. The theme I had created was very basic and only used the default index.php page for displaying all posts and had no pages at all actually.

The solution

The solution, of course, was to simply add a custom page template to the active theme. A custom page template can be very easily created by downloading your current page.php file, renameing it page_custom.php and adding something like this to the top of it:

<?php
/**
 * Template Name: Page Custom
 *
 * Description: A custom page template by Ian L. of Jafty.com
 *
 * @package WordPress
 * @subpackage WTTF
 * @since WTTF 1.1
 */

?>

The above needs to be at the top of your new page_custom.php inside PHP comment tags as I have demonstrated. Once you add this, you may also wish to make any custom page alterations you wish to the code below the comments and save the file. Then upload it to your server either in the same directory as page.php was in or you can add a custom folder for custom templates and WordPress will find it. Either way is fine. Once you upload your custom page, open your page editor again in the WordPress admin and you will now see the template option appear under the parent option in the right column normally.

Good Luck!

Leave a Reply

Your email address will not be published. Required fields are marked *