Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I think this happened when I upgraded to 3.4, or it might have happened more recently. The template drop down list is now missing most of my templates. Pages that were using the templates are still working but when I go to edit the page the drop down says 'Default template' and the template it is currently using is not shown in the drop down box.

does anyone have any ideas why they disappeared or what I can do to get them back?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

There was a WordPress 3.4.1 update released a little over a week ago. One of the bugfixes mentioned is "Fixes an issue where a theme’s page templates were sometimes not detected." Have you tried doing that upgrade yet?

share|improve this answer
add comment

Your template headers are possibly not formatted correctly. If I remember correctly, I saw something recently about the code used to read in page templates had changed and was more strict about proper header formatting. Make sure the name is on its own line there is space between name and comment asterisks:

<?php
/*
Template Name: Snarfer
*/
?>

or

<?php
/* Template Name: Snarfer */
?>
share|improve this answer
    
Not true, /*[break] * Template Name: Snarfer[break]*/ will still work. –  TheDeadMedic Jul 6 '12 at 17:05
1  
Both observations by Milo and TheDeadMedic are correct. Milo for 3.4 and TheDeadMedic for the 3.4.1 update. That is exactly the bugfix mentioned by @DougalCampbell. Conclution: Just have the site updated to 3.4.1 –  marikamitsos Jul 6 '12 at 17:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.