Support » Fixing WordPress » Theme editor does not show all template files

  • Resolved saphod


    Somehow, after upgrading to WP 2.1, the online theme editor that one can use via WP-interface does not show all but only some of the templates that are stored in the wp-content/themes directory, although I have set all attributes equal for all files… how come?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Yes, it’s strange. I created a new template (by copying page.php to e.g. newtemp.php and then editing it to include the template name at the top) and then created a page with that template. But the theme editor does not list the new template.
    I have looked at the Theme Editor source code (ie the generated HTML) and my new template file is in the list as the link (ie newtemp.php) but with no text, which is why it doesn’t appear.
    Anybody know why ? My page works fine and of course I can edit my new template outside WP, but it would be nice if it’s accessible through the theme editor.
    (This whole behaviour is intermittent – I created a new template the other day and everything worked fine, but I can’t see what I did differently!)

    You must change the information in the top of the template:


    Template Name: information


    /* Template Name: information */

    I don’t know why, but it works.

    Great tip, koenoezsi!
    Many thanks, it works fine now. So easy when you know how!

    Moderator Mark Jaquith


    WordPress Lead Dev

    This issue will be fixed in WP 2.1.1 (first bugfix release for the 2.1 branch… release date TBD).

    The bug is that you need a space after the last character of your template name, which is why koenoezsi’s suggestion works.

    Thank you very much for your help!
    I now declare this post resolved.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Theme editor does not show all template files’ is closed to new replies.