Page Template drop down missing in WordPress 2.6
Aug 10, 2008 | Featured, Wordpress

I upgraded from 2.5.1 to 2.6 last month. It is a good version and better than previous one. They fixed the Custom field problem and I am happy.
I discovered some new bugs in this version. Where are page template drop down in WordPress 2.6? Ya, the page template section is missing. I couldn’t find it whenever i try to create new page with custom template. Weird @-@
So, i just play with the wp-admin dir and try search the problem. What make this thing happen?
I figured out the edit-page-form.php in 2.6 is not the same as the 2.5. They add some new function to it.
The new 2.6 :
2.5
*click for bigger image
<?php if ( 0 != count( get_page_templates() ) ) { ?>
If it not equal to zero(the number of page template in you theme dir), it will automatically appear. But the page template drop-down still not there . What i can see is they add function. It is totally different.
Solution :
I made some modification to edit-page-form.php by adding some value.
- Go to wp-admin dir. search for
edit-page-form.php - Open it with text editor.
- Go to line 265. replace 0 with greater value like 110.
- Save it.
Refresh post page. The Page Template drop down should automatically appear now.




not having problem with it.. if the template file is available on theme directory n correctly specify it for custom template it will automatically appear.. if the file doesnt exist the menu will not be there..
It worked for me, thx.
this kinda out of topic question,
what kind of software are u using to edit the php file?
i use e-text editor
Hi,
I found this and another weird solution about changing the theme, any of then worked for me.
I just changed wp-admin.css
I posted here:
http://ceslava.com/blog/solucin-al-bug-de-wp-26-para-las-plantillas-de-pginas/
The post in spanish but you just have to look for the last css code
Thanks for that – got the menu on but the drop down didn’t contain any of the theme templates! Ahhhh!
WP 6 it’s ok. Just you must add template (admin panel) when you add new file with template.
Yahooooo
The drop down appears but it is not possible to select a page template. Am I supposed to change this:
[code]
[/code]
in some way?
This is hidden in my latest post:
/*
Template Name: Links
*/
@joakim
better don’t. i suggest you to upgrade to the latest 2.6.2. I guest there is something wrong with the theme code that disable some wp-dashboard function. Some themes are fine. If the template already in the directory. The drop down menu will show. Else check your theme function.php
i hope my explaination will help you
I am using wordpress MU and the admin main site has the page template, but the smaller sites ( mysite.com/othersite ) doesn’t have the template.
i am not sure about wp MU. sorry
Подскажите шооблончег под Wordpress 2.6.2, чтобы был похож на ваш frozr.com.
Заранее благодарю)
Hi,
Thanks for this. I was wondering where this function has gone
Thank you so much!! I installed word press with Fantastico and noticed that the templates were no longer there – since my site uses about ten templates I was in real trouble! Thanks again for the fix!!
This worked for me too, and was the only fix I found that did. I only had a problem with this using certain themes. Good job and thanks for posting it!
I think this may be a work-around that doesn’t necessarily fix an underlying problem.
I have 2 new installs of the latest version (development & production). Both have the same configuration. Both have “0″ in the edit-page-form.php file. Meanwhile, the template dropdown is available for one of the installs and not the other.
Actually, update:
All I had to do was temporarily activate a different template, then reactivate my real template and the dropdown appears and functions properly. Hope that helps.
In the actual template php file (for example: archives.php), you have to include the blurb at the top of the file that says:
Check out the first 10 lines of the default template’s archive.php.
That solved the problem for me. Until wordpress recognizes there is more than 1 main template they won’t put the drop down box for Page Templates.
Hope that helps!
ok it took out the code from my first post below, sorry. Just check out the first few lines of the Default themes’ archives.php file.
YOUR A GENIUS! WORKED PERFECTLY!! THANKS!!!
It worked! But I can only select the default template…
thanks, it worked… just what i was looking for!
Rejoyed too soon!
the drop-down-menu is now showing – but only the default theme. no more choices. ???
am using stocks starkers theme in wp 2.8.4… and can´t find a solution it seems…
oh, i found the problem…
i didn´t name my theme in the css-file and so wp had some difficulties… it´s working now….
Wow… I am looking for this since long… finally you made my day!
I never imagined I would find a fix for this issue, thanks so much!!!!!!!!!!!!
Selecting a theme again from admin did the trick for me.
The problem is not the code, but rather the fact that the template files must have the appropriate comment at the top to denote them as a template file. If, for example, the archive.php file does NOT have the comment as follows:
/*
Template Name: Archives
*/
near the top, it will not be recognized by the drop-downs. Add these comments to the php files in your theme, and you’ll be all set.