Page editor missing Templates drop down

Update: As with so many mysteries, the cause turned out to be extremely stupid. I had the file saved in a different theme’s directory. Thanks to @a4jp.com

I’m building a theme using underscores. I’ve created a template file and added a template header at the top.

<?php 
/**
* Template Name: Featured
**/
get_header(); ?>

I’m not getting a Template drop down under Page Attributes in the page editor, so I’m not sure if there’s a problem with my formatting or something else.

I did try switching themes. The drop down appears in the other theme, but when I switch back to my custom theme, it’s still missing.

5 s
5

Maybe this will help.

<?php 
/*
Template Name: Featured
*/
get_header(); ?>

Regular code here…

<?php get_footer(); ?>

If one theme works you could try replacing the files in the broken theme and test which file or files are broken. But first save the old files in a separate folder as a backup. Then you would know which file or files are broken pretty quickly.

Leave a Comment