Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
1  
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
add comment

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

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

1 Answer

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

    <?php
    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
add comment

Your Answer

 
discard

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.