Support » Themes and Templates » Organizing Template Files Into Folders

  • I am working on an extensive WordPress site at the moment that is going to require over 45 template files. So naturally I want to have some form of organization to keep the files on my server somewhat tame.

    Here are is what I was trying to do, and what the outcome was:

    I had a folder within my theme root called levelonetemplates. So in here I had about.php, contact.php, etc.
    I created the pages and and applied the templates to the respected pages. However, I found that as I was editing the page templates, the actual displayed pages were not changing.

    After much troubleshooting, I finally found out that if a page template is in a folder within the theme root, it is recognized by the edit page area in the admin panel, but it does not load the template when the page is displayed. I took the template file and put it into the root directory of the theme, and my changes showed.

    I want to be able to organize my template files into folders. Is anyone aware of how this can be done? The templates are already recognized, but they do not load when being displayed.

Viewing 2 replies - 1 through 2 (of 2 total)
  • MichaelH


    You might be interested in child themes and how they work:

    Also there’s been some work in 2.9 about different template folders—see

    I also have this question, but for page templates regarding custom post types. Doesn’t look like there’s a solution for this, which is really sad. I hope that there will be a solution for this soon, or if you could create an additional function or filter (a.k.a. “whatever”) to make WP search all folders withing the theme folder for every page template that is available, that would be awesome!

    In the WP framework and thematic etc, they’ve defined folders to scan when it comes to functional php files… why isn’t there a way to look for custom page templates in all folders in your theme?

    If custom post type will make WP a true CMS, then a better folder structure is mandatory, don’t ya think?

    Yes, child themes will help to decrease files in the theme directory, but if you have a huge website, then there will be a lot of templates even there…

    I’d really like to get a solution for this – soon!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Organizing Template Files Into Folders’ is closed to new replies.