WordPress.org

Forums

[resolved] Missing template attribute in WordPress 2.9 (15 posts)

  1. Zack Grossbart
    Member
    Posted 5 years ago #

    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

  2. webtiva
    Member
    Posted 5 years ago #

    Seems like a plugin conflict. Deatictave all, test and reactivate one by one to identify the 'rebel' plugin.

  3. Zack Grossbart
    Member
    Posted 5 years ago #

    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?

  4. artesea
    Member
    Posted 5 years ago #

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

  5. vangrog
    Member
    Posted 5 years ago #

    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

  6. Zack Grossbart
    Member
    Posted 5 years ago #

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

  7. Praym
    Member
    Posted 5 years ago #

    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.

  8. MacDoodle
    Member
    Posted 5 years ago #

    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.

  9. mak1e
    Member
    Posted 5 years ago #

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

  10. relish1227
    Member
    Posted 4 years ago #

    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.

  11. Mark / t31os
    Moderator
    Posted 4 years ago #

    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.

  12. Tiff.web
    Member
    Posted 4 years ago #

    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! =)

  13. asplash
    Member
    Posted 4 years ago #

    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.

  14. JuneAlbert
    Member
    Posted 4 years ago #

    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.

  15. MHnCZ
    Member
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic