Support » Fixing WordPress » Missing template attribute in WordPress 2.9

  • Resolved Zack Grossbart

    (@zgrossbart)


    I just upgaded a few blogs to WordPress 2.9. One of them was a sandbax that has almost no plugins and just the standard themes. The other had a number of different plugins and is using the Thesis theme.

    One the one with the Thesis theme the template choice box in the Attributes section when editing a page is missing. There are no errors, it just isn’t there. I’m not sure what more information I can give.

    Have I found a bug? Any ideas how to get the templates choice box back?

    Thanks,
    Zack

Viewing 14 replies - 1 through 14 (of 14 total)
  • Seems like a plugin conflict. Deatictave all, test and reactivate one by one to identify the ‘rebel’ plugin.

    No luck. I disabled all of my plugins and it still didn’t show up. It is also worth noting that I’m using the same plugins for WordPress 2.9 that worked in 2.8. Any other ideas?

    Sounds like a conflict with the theme and 2.9 as “Template Choice” isn’t standard in wordpress. Try asking the theme creator.

    Try repairing and then optimizing your tables on phpMyAdmin, if you have access to it (otherwise, try some plugin which can do the job for you — without needing to log into your SQL server).

    ————

    Define “default template” to be used on your blog, and check if everything works ok with it. If so, your other template might need some changes to work with WP 2.9

    It was a problem with my theme. I’ll go bug them. Thanks.

    I too was facing the same problem.
    Page template attribute was not showing up for the custom theme.

    I found that this was happening because the custom theme did not have any custom template.

    A custom template will have a header entry like :
    Template Name: Archieves, as in archieves.php

    <?php
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */
    
    /*
    Template Name: Archieves
    */
    ?>

    The default theme has two custom templates :
    Archieves.php
    Liks.php

    Hope this helps further.

    I had the same problem until I noticed that the theme I’m using was not listed as the Current theme (Appearance > Themes). For whatever reason the upgrade to 2.9 turned that off.

    Reactivate your theme, templates dropdown should show up again.

    that worked for me, but I didn’t upgrade I just activated/enabled a plugin. SO careful when you activate/enable a plugin.

    relish1227

    (@relish1227)

    Whew. The Page Template dropdown just disappeared for me, too.

    I deactivated all of my plugins — it seemed that Magic Fields was the culprit. I reactivated it / them and it was back.

    As a quick fix, usually (not always) switching to another theme, then switching back, will fix the problem, or at least it has done previously for a number of users, including myself.

    Not a guaranteed fix, but works in most cases.

    NOTE: Page templates reside in the active theme’s folder, if your theme does not have any page templates, then none will appear to choose from when managing a given page. Page templates are also required to include a commented line to indicate they are page templates, an example can be seen on the codex entry for pages, here.

    I’m using 3.0.1 and my templates where not showing up either, I tried a few different things mentioned and then this worked: You have to give your new template a name:
    For instance my new template file name is “page-new-layout.php”
    So I added the code below to the very top of that page:

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

    Add it above this line

    <?php get_header(); ?>

    Then I went to edit my page and was able to choose my template!! Hope this helps someone! =)

    I had the same problem. I use Theme Test Driver when creating new sites and I had to disable it to select one of the alternative templates I had created. Once I re-enabled Theme Test Driver, the choice of templates was no longer available, although I could now test my new template.

    I experience this problem too and I solved it by changing the appearance theme to another theme and set it back to my selected theme.

    The simplest and most elegant solution is often the best, which is true of Tiff.web’s. It’s logic is that a template must first be given a label/name so that it can be included (by using it’s name,) in the drop down list in Page Attributes. It looks like the solution intended by the WordPress application designers and not like a hack. Worked for me. Thanks.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Missing template attribute in WordPress 2.9’ is closed to new replies.