[resolved] Template Pages not showing up (6 posts)

  1. jrm213
    Posted 8 years ago #

    I created two custom template pages for my site. In my test wordpress they show up fine when I click write page or manage page I can choose the template.

    I copied them into the theme directory for my live site (the active theme) , but they do not list in the page templates dropdown when I try to write or manage a page.

    They are both the same version of wordpress. I don't understand why it can't see them. The files have the same permissions in the directories too.

  2. level2d
    Posted 8 years ago #

    I am having a similar issue. I created custom templates but they didn't work for me either. What theme are you using. I am using the Cutline 3 column theme.

    I can access them and edit them in the "theme editor" section of the admin panel, but when I try to visit the section online, it isn't there.

    Stranger still, some of the default templates, like the "Sitemap" don't work either, but the "Archives" page does work.

    I would love to help you on this, but I haven't received any help myself.

  3. level2d
    Posted 8 years ago #

    also, i added the the correct code at the top of the page:

    Template Name: page title here

    That isn't working for me.

  4. jrm213
    Posted 8 years ago #

    Ok, I resolved this for me, but I think it is a pretty big bug in wordpress unless I am missing something.

    I am working with a custom theme that I wrote.

    There were two things that caused this problem, or maybe one thing depending on how you look at it.

    I wanted my CSS Files for my theme to be in a css directory. So I moved the style.css file into the css directory. Then I changed the stylesheet entry in the database to reflect the themename/css and everything seemed to be ok. However, the next time I went to presentation it said I was using the default theme instead of my custom theme. So if I put my template files in the default theme folder they showed up, and it was still picking up the css I specified for my custom theme.

    So finally I decided that I guess I can't have a css directory for my css files and moved style.css back into my themes root folder and selected my theme in presentation, and everything works ok now.

    I don't understand why removing style.css from the theme root would make wordpress switch back to "Default" theme, especially since I told it in the database where the stylesheet was.

    In any case hope this helps you level2d

  5. Scott Kingsley Clark
    Posted 8 years ago #

    This is a set-back of the WordPress theming system. It looks for style.css in your theme folder and will not accept any from sub-folders. If it doesn't find it, it won't find your theme name and version. For example:

    My Custom Theme
    Version: 1.0

    This is the same for custom page templates, which can end up cluttering your theme's directory. I'm a fan of the structured file system, but everything in root (especially all the root files in a WordPress installation) seems to bother my OCD. I once worked on a CMS that had 2 files, a .htaccess file and a index.php file, the rest were all in the cms's main folder. So you would go to the server and see three items listed. That's clean!!

  6. niiiiiic
    Posted 7 years ago #

    Wow, glad i found this I would've been looking for days.

    Couldn't figure out why the templates I created were not showing up. Turns out I deleted the content at the top of the style sheet that was commented out (Theme name, version, etc) and sure enough that's what did it.

Topic Closed

This topic has been closed to new replies.

About this Topic