1

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.

2
  • 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? Jun 24, 2011 at 12:46
  • Just a side note: You could store the complete WordPress in a subdirectory.
    – Roman
    Sep 25, 2011 at 15:44

1 Answer 1

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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