Home Daily Marketing Tips About Me Work With Me

Marketing & Design Blog

Internet Marketing, SEO, Blogging, Social Media, Lead Generation and Analytics

WordPress 2.7 Page Templates Not Working

,

Today I was working on a few minor changes to my site’s design and I wanted to add a few custom page templates to the site. I have been working with WordPress for as long as I can remember and I have used custom page templates extensively in the past. However, today I ran into an apparent bug in the 2.7 version of WordPress.

Here’s the problem…

I uploaded the new custom page template files just like I have always done in the past, but this time they did not show up as options in the WordPress admin area when I went to edit my pages. Normally the drop-down in the page edit area will provide a list of available(correctly coded) page templates. But today, this was not the case.

I did the standard web designer routine…


First: I shouted at the computer and scared my dogs (they don’t understand why I yell at the computer).

Second: I checked and re-checked that I was not making any stupid mistakes.

Third: I visited the WordPress forums only to find a few others with similar problems and no solution.

Fourth: I switched themes and see if the same problem would happen in another theme… It did.

Fifth: I switched back to my main theme and… Presto! Suddenly the pages were showing up.

After doing a little testing I found that for some reason version 2.7 of WordPress is not finding new custom template pages automatically. It seems that currently the only way to get the script to recognize newly added template pages is by temporarily activating another theme and then switching back again. It is a major pain in the ass to say the least, but at least I found a solution and was able to finish what I was doing.

If you have also run into this problem, you likely did some Google searches and ended up here. I just hope you started with the searching online, rather than yelling at the computer like I did.

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

45 Comments »

  1. unfortunately i yelled at the computer also…ranted at it for a little while..until i finally found this post..then i became deeply paranoid i would lose everything if i changed theme…but it worked
    thanks man :)

    Comment by M — January 16, 2009 @ 7:26 pm

  2. Glad I could help!

    Comment by zacheos — January 18, 2009 @ 3:29 pm

  3. Thanks! I’ve been staring at my blog for the last hour trying to work out what I was doing wrong.

    Comment by Christopher Ross — January 21, 2009 @ 1:34 pm

  4. I experienced the same problem. But changing themes ahs not jump-started my templates. They still aren’t showing up. I can see one that I uploaded a couple weeks ago, but not my new ones. Crap!

    Jeremy’s last blog post… Mass Transit in Metro Detroit

    Comment by Jeremy — January 23, 2009 @ 1:31 pm

  5. I just experienced the same thing and I created numerous different templates, all the templates suddenly appeared once I changed to a different theme.

    Try switching themes, then quick edit the page to see if this works for you.

    Comment by Jamiel Sharief — January 29, 2009 @ 8:45 am

  6. Worked like a charm… I was one step away from throwing my computer against the wall ;)

    Thanks!

    Comment by Richard — January 30, 2009 @ 12:46 pm

  7. Nice! I know the feeling… Nothing like KNOWING you are right and having the computer (or software, or browser, or database) disagree with you!

    Comment by zacheos — January 30, 2009 @ 12:58 pm

  8. Hey thanks! It’s a very important tip for me!!!

    Aw Guo’s last blog post… Huge fire burning near CCTV headquarter building on Feb 9

    Comment by Aw Guo — February 10, 2009 @ 8:34 am

  9. Thanks so much for this handy bit of information. I am currently using the plugin “Theme Test Drive” 2.7.2 by Vladimir Prelovac, and therefore was not working on the officially active theme, but your lovely solution still worked like a charm :-)

    Comment by Laura — February 13, 2009 @ 11:59 am

  10. Thanks for finding this. I can see absolutely no connection between temporarily switching themes and having new page templates be recognized. I don’t know if I would have found it myself. Cheers. Works perfectly.

    PeterVk’s last blog post… PeterVk: Seriously, WordPress. I know you have a lot of bugs to fix, but please make this a priority: http://bit.ly/lbo77 머리 아파…

    Comment by PeterVk — February 16, 2009 @ 6:00 am

  11. Blarg!

    I tried switching themes and still can’t get the stupid things to show up. Now I’m off to check to make sure that I haven’t made any coding mistakes. Based on the positive responses that you’ve gotten so far, I’m going to assume that I’m screwing up somewhere along the way. *sigh*

    Amy @ Taste Like Crazy’s last blog post… MilkBank – All in One Bottle

    Comment by Amy @ Taste Like Crazy — February 20, 2009 @ 10:56 am

  12. Good luck… Love your site by the way! Very interesting writing voice.

    Comment by zacheos — February 20, 2009 @ 11:21 am

  13. Thanks! Guess what? Totally worked. I was just being impatient. :)

    Amy @ Taste Like Crazy’s last blog post… Did You Say Shredder?

    Comment by Amy @ Taste Like Crazy — February 20, 2009 @ 1:56 pm

  14. I found this in the FAQ:

    http://codex.wordpress.org/FAQ_Using_WordPress#Why_is_there_no_Page_Template_option_when_writing_or_editing_a_Page.3F

    Comment by Runar — February 25, 2009 @ 1:26 pm

  15. Thanks for the link… However, the problem is that sometimes this does not work like it is supposed to. For reasons beyond the scope of this article, WordPress 2.7 will fail to “see” new page templates have been added to the system. In this case, you will need to follow the steps provided above to force WordPress to “refresh” its view of the current directory structure.

    Comment by zacheos — February 26, 2009 @ 7:58 am

  16. [...] little searching directed me to this post by Zach Graeve with a very simple solution. The trick Zach describes is to temporarily switch to another theme and [...]

    Pingback by WordPress Custom Page Templates Not Showing In Dropdown Menu | Van SEO Design — February 26, 2009 @ 11:02 pm

  17. Thanks for this post. This had happened to me a couple of times before – I fixed it through sheer luck, but always forgot what the solution was. Considered this page bookmarked.

    Comment by Russ — March 6, 2009 @ 4:52 am

  18. My Page template dropdown in the wp 2.7 admin menu totally disappeared when I go to edit the page. When I quick edit, there is only default in the dropdown even though I have about half a dozen page templates which use to show up!!!

    Thanks in advance for your time and consideration!

    Comment by Andrew Kelley — March 9, 2009 @ 9:09 pm

  19. Thank you very much (although Dell won’t thank you as I would have had to buy a new computer after treating this one to the sledgehammer).

    Comment by Tim Sewell — March 12, 2009 @ 10:26 am

  20. Thank you Zach! I think you PREVENTED me from having problems with that. I am just about to do a bunch of custom templates for a customer. Would have been a little embarrasing to get delayed by such a quirky problem.

    Keep on rockin’ my man.

    Comment by ZenGlen — March 12, 2009 @ 7:29 pm

  21. yeah, I am too facing the same issue, this is an bug within wordpress 2.7.

    ~Himanshu~

    Himanshu’s last blog post… Recession hits dinosaurs

    Comment by Himanshu — March 24, 2009 @ 1:55 am

  22. HELLO THERE
    I GOT A PROBLEM ,
    MY RECENT POST LINK IS DIFFERENT( SHOWING IN SIDE BAR) AND MY POST LINK IS DIFFERENT , SO WHEN SOME BODY CLICK ON MY RECENT POST LINK ,THEN IT DOESN’T OPEN MY POST PAGE PLS HELP ME (RECENT POST LINK LOKE LIKE”http://www.currentopics.com/?p=126″ AND MY ACTUAL POST LINK LOOK LIKE”http://www.currentopics.com/?paged=3″)

    Comment by anjul bamhrolia — March 28, 2009 @ 1:10 pm

  23. pls help me my comment page also not showing, all blank, and when i switch to an other theme it all blank NO POST NOTHING……. my email-anjforeva@gmail.com my blog-http://www.currentopics.com/

    anjul bamhrolia’s last blog post… What is Terrorism ?

    Comment by anjul bamhrolia — March 28, 2009 @ 2:30 pm

  24. Hey Zach -

    I tried your suggestion with no luck… any other ideas?

    Such a PITA!!!

    Bradley’s last blog post… Health Insurance Nightmares – Annual Rate Increases Too High To Keep Up With

    Comment by Bradley — March 29, 2009 @ 12:14 am

  25. It is just not acceptable to have to do this kind of workaronds for something that should just work. The WordPress guys are better fixing this problem as soon as possible. We shouldn’t be happy to find a solution for such a problem. We should all be mad that we have to waste a lot of time trying to figure things (bugs) out and to look for solutions on the net. It should just work, shouldn’t it? My point is that we should make some noise in the ears of the WordPress people, instead of just saying, oh, ok I found a way to make it work. Switching theme every time you want to apply a template to a page? C’mon! It just drives me crazy, when a basic function don’t work the way it is menat to.

    Comment by Gianfranco — March 31, 2009 @ 3:38 pm

  26. Just found a very weird fix to the “template dropdown menu” not showing under the “attribute box” in “pages”. Actually, in my “style.css” file I had something written for “template”.

    /*
    Theme Name:
    Theme URI:
    Description:
    Author:
    Author URI:
    Template:
    Version: 2.0
    */

    I just removed it and the “template” function just work. When I write something in the “template” line, the function is broken again. Weird!

    Comment by Gianfranco — March 31, 2009 @ 3:55 pm

  27. That is very strange indeed… I would have to do a bit of testing to understand why the style sheet would be related to this bug.

    Comment by zacheos — March 31, 2009 @ 8:07 pm

  28. I’m gonna try this before I go totally doolally

    Comment by Jacqueline — April 17, 2009 @ 8:00 am

  29. It’s the first time I commented here and I must say you share us genuine, and quality information for bloggers! Good job.
    p.s. You have a very good template for your blog. Where did you find it?

    Comment by mssmotorrd — May 3, 2009 @ 5:52 am

  30. Thanks for reading my blog! I run this site as nothing more than a hobby, so it is always nice to hear that my efforts are appreciated. This site was of course designed by me, and if you read it often you know that I am always changing it. Give it a couple of months and I am sure I will change it again.

    Comment by zacheos — May 3, 2009 @ 9:53 am

  31. Thank you! This has been confounding me for the last 30 minutes or so.

    I actually even thought to toggle themes, but then I thought, “Nah, that’s too easy, and it doesn’t make sense.” Go figure.

    Comment by AMP — May 4, 2009 @ 7:01 pm

  32. Thanks for posting the solution. Saved me some headaches. Can’t believe that WordPress doesn’t have a better option for refreshing page templates.

    You rock!

    Comment by Sterling Okura — May 4, 2009 @ 11:34 pm

  33. Thanks for your help!

    Comment by Sean — May 5, 2009 @ 4:57 pm

  34. Thanks Zach! I’ve had that issue on two sites now. Hopeful never again! Time to go a make the donuts and swap themes.

    Thanks

    Art Insight TV’s last blog post… John Singer Sargent

    Comment by Art Insight TV — May 21, 2009 @ 11:29 am

  35. Thanks Zach, this was an instant fix to a realy anoying problem. Simple, switch themes and switch back and bobs your uncle!! cheers

    mark’s last blog post… Saving images for email & the web

    Comment by mark — June 21, 2009 @ 9:58 pm

  36. Cheers Zach, great post mate. Worked a treat. Freaking weird bug!

    Comment by Gareth Dickey — August 22, 2009 @ 3:30 am

  37. Thanks!
    Great help.

    Comment by Kalle — September 7, 2009 @ 4:59 am

  38. The real answer. thanks.

    Comment by Kamrul — November 29, 2009 @ 11:36 am

  39. Thanks very much for this. I had the same problem with 2.8.6. This fixed it.

    Comment by Harvey Ramer — December 9, 2009 @ 2:06 pm

  40. THANK YOU SOOOOO MUCH!!! SAVED ME A BUNCH OF TIME!

    Comment by Echo — December 10, 2009 @ 7:09 pm

  41. You just saved me so much trouble! Thank goodness I only goofed around with it for 20 minutes before firing up Google.

    Looks like the bug still exists in 2.9.1. First time ever encountering it, and I’ve been playing around with WordPress since about version 2.6.

    Comment by Derek — January 10, 2010 @ 9:04 am

  42. thanks! step 5 was a real live saver, saved me the freak out time.heh

    Comment by Anton Korzhuk — January 20, 2010 @ 9:26 pm

  43. Nice one, really helped me out. Looks like the same issue occurs if you delete the default stylesheet from the theme directory too.

    Comment by phil — April 8, 2010 @ 12:00 pm

  44. Thanks!!!!!!!!!!!!!!!! It works!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    I’ve spent 5 hours to find what is wrong!

    Comment by Timmy — April 23, 2010 @ 11:27 am

  45. Thank you so much. I was starting to lose my mind. I've been working with WordPress for years and haven't run into this issue yet. A simple template change and then back and viola. By the by I know this is an older post this also works with the newest version of WordPress 2.9.2. Thanks a ton:)

    Comment by Nate Balcom — May 20, 2010 @ 3:55 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

logo design brand development

We have simplified the typical logo ordering process, put you in direct contact with the artist, made getting additional branding products and websites easy, and rounded it all off with high quality printing services at fantastic rates... Learn more

website design development

We have made getting a completely dynamic website built on the WordPress content management system with a theme of your choice easy. We integrate your logo into the site design and offer great add-ons at amazing prices - giving you a range of choices on design and layout... Learn more

search engine optimization

We have expert SEO consultants ready to tackle any aspect of your search engine marketing and optimization needs. We take pride in the ability to custom build an Internet marketing campaign that is perfectly suited to your needs.... Read more


© Copyright 2003-2010 Zach Graeve and Expert Online Services, LLC. All Rights Reserved.
 Subscribe, RSS, Comments RSS, XML Sitemap, Privacy Policy