WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a wordpress function to move theme's templates into a subfolder (mytheme/templates). Anyone know?

The solution can be paid (plugin) or free.

share|improve this question

migrated from webapps.stackexchange.com Apr 24 '11 at 18:01

This question came from our site for power users of web applications.

What is it you're trying to accomplish? Do you have some need for the template files to be in a subfolder, or is it just for aesthetics? – Chip Bennett Jun 24 '11 at 12:46
Just a side note: You could store the complete WordPress in a subdirectory. – rofflox Sep 25 '11 at 15:44

Not easy to do. You can create redirect template and assign templates based on page ID

    if (is_page('629')) { include(TEMPLATEPATH . '/pages/homepage.php');}
    elseif (is_page('186')) { include(TEMPLATEPATH . '/pages/generalpage.php');}
    else { include(TEMPLATEPATH . '/pages/defaultpage.php');
} ?>

See this for more details

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.