I am working on a Wordpress-based project, and I just added a new template to the installation by uploading a template file. I was creating a new page that will use my new template, when suddenly, the "Template" dropdown in the "Page Attributes" box is gone.
I am using Wordpress 3.0.1.
Update: I saw a site which told me to revert to the default template, and back to my custom template. Apparently it worked, but I am still baffled on what triggers this bug. Also, any additional knowledge or pointers on this bug would be a great help since my job requires me to patch this (and possibly submit the bug fix to Wordpress). Thanks!
If you have disabled or removed the style.css from the template directory then also it will not work.
So there must be the style.css on template directory then the templates directory will be shown. When you try to remove the style.css from the template directory or using style.css from css folder, then you must be put one style.css on template directory.
Thanks
I had this problem a while back and found one janky solution after a lot of search--sometimes switching to another theme in your install and then switching back to you primary theme will make your templates appear. I know that sounds weird, but worked for me for a while.
I managed to fix this by making sure the
style.css
in the theme root contained the theme comments. I accidentally deleted mine and it removed the templates dropdown.https://codex.wordpress.org/Theme_Development#Theme_Stylesheet
I tried many of the suggested answers. None worked in my case.
A possible reason for the Template Dropdown not showing is a missing
index.php
in your Theme folder.Just create an empty one, in case your hierarchy does not need one. But the existance of that file enables the option to choose the page template and suppresses an error message in the Choose-Theme page btw
Jack Nicholson was right! You need to make sure your style.css contains the full comment. Example below:
Previously mine was:
Then I changed it to the below and now I can see all my templates.
Please set properly you style.css file specially if you are working on child-theme