Page Template dropdown missing in WordPress 2.5

Today i want to create a new page template for different display purpose, just create a new page template as following content

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

save it as “newtemplate.php” and uploaded to theme folder.

However when i want to create a new page and choose my newly created page template. I can not find any Page Template drop down in my WordPress 2.5, it will automatically display in WordPress version < 2.5 . What's wrong with version2.5? After try and error few time i find the following solution is work for me.

1) Design -> Theme Editor -> Page Template (page.php) (Default Page Template)

2)Append following code at top of the page.php (Template name can be anything)

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

3) Saved it.

4) Page template drop down is display in write page now.

I really do not know why this happened? Is this a bug in WordPress 2.5? No idea, however above solution is work for me. Hope Help.

Tags :

About the Author

mkyong
Founder of Mkyong.com and HostingCompass.com, love Java and open source stuff. Follow him on Twitter, or befriend him on Facebook or Google Plus. If you like my tutorials, consider make a donation to these charities.

Comments

  • Pingback: WordPress Custom Page Templates Not Displaying In Dropdown - Vanseo Design()

  • http://þÿ Maria Lorion

    Hello.This post was extremely fascinating, particularly since I was searching for thoughts on this issue last Sunday.

  • http://www.felixmagic.com sulap

    i just got curious how can you find the tweak of this bug. ur post really helpful.

  • http://www.outsourcedesignservice.com outsource web design

    Since we appear to be in a Page Template dropdown missing in WordPress 2.5 state of mind, Setting up your site is usually a complicated operation. Discovering the right website design organization for your website is very important. Unless you run a web-based business, it is likely you lack web design experience inside the company. Constructing your web site will take some time and a small amount of research!

  • http://www.hervibe.com kathy

    Thanks…your information really helped.

  • http://ijlalhasnain.com/blog dandy

    Thanks alot mkyong.
    I had this problem in WP 2.9.1
    Searched for hours and then found you page. And this works some how. Thanks alot for sharing.

    • http://www.mkyong.com mkyong

      What? WP2.9.1 still has still problem? Wonder why they do not fix it?

  • http://rajasulap.com daniel

    Wow man your information really helpful, it saves me more than 2 hours of trial i suppose. but anyway i just got curious how can you find the tweak of this bug?

    • mkyong

      luck…haha, i just follow the default page template, it’s just work like a charm :)

  • http://dagandroitsocial.com gyangting

    This post was pretty helpful to me. The probelm still exists in WP 2.8.4 and the solution above works pretty well still.

    Thanx!

    • mkyong

      np ~ just wonder why WordPress team didnt fix it ?

  • Pingback: WordPress Custom Page Templates Not Showing In Dropdown Menu | Van SEO Design()

  • http://alancordle.com/blog/ cordle

    It’s 2.6 — I need to upgrade. Thank you.

    • mkyong

      sorry, i’m using ver 2.6 as well, it’s seem no problem for me. Hope you can get a solution soon and share it to me :)

  • http://alancordle.com/blog/ cordle

    Thanks — this looks like what I need for a similar problem:
    there is no drop down for “Password Protect This Page” — Do you know how I could fix this please?

    • mkyong

      Password Protect This Page is not a drop down list, it’s display as a single box, may i know your wordpress version?

  • http://afterthe.net/journal Pali Madra

    Excellent!

    Thank you for the fix!

    It worked for me when I updated to 2.6.5 therefore this holds true today as well.

  • ooopinionsss

    How you think when the economic crisis will end? I wish to make statistics of independent opinions!

  • http://xhtmldude.com/ XHTML Dude

    Thanks man, this really helped me, i am n00b in WP, and was confused the first time i make a perfect template page but ut was not being recognized/shown in the drop down.

    That really pissed me off until i found this post. Thanks again for writing this.

    • mkyong

      welcome, actually i suffer a lot from this issue as well ~ hope it fixed in latest WP release