I've got a subdirectory in which I'd like to implement a completely different theme for my site (basically, its a sales letter).

Can someone tell me how to do that? Do I need to install a separate copy of wordpress in the subdirectory?

2 Answers 2


To slightly sidestep your actual question, the template hierarchy allows you to have a custom handler for any post ID, category, taxonomy term, etc. That may be the quickest way to solve your problem: just create a template file that stands on its own and only serves request to one post (or category, or however the sales letter(s) are identified).

You don't have to call get_header(), get_footer() or any of the other template functions, so you're free to have a completely different page structure for a single post on your site.

  • "for a single post on your site." Or a single page, or category, etc. Just to clarify :-) Aug 26, 2010 at 18:20
  • @Scott B: @Adam Backstrom has your answer... Aug 26, 2010 at 18:22
  • perhaps this is a whole other question, but am I allowed to store the special handler template in a subfolder under my main theme? Or does it have to reside in a specific location only? e.g., I want to neatly store these subtemplates inside my theme's "styles" folder, then each inside its own folder under styles.
    – Scott B
    Sep 10, 2010 at 15:17
  • @Scott, get_page_templates() specifically disallows page templates in subdirectories. If you want this functionality, you should look at the logic within the get_page_template() function and make use of the page_template filter called within.
    – user66
    Sep 10, 2010 at 16:39

You could load your stylesheets in (a hook) in your header. Then use wp_enqueue_style to load them on a per-site basis:

1.a) make a custom header file for page-template-file.php and use a custom header with a conditional tag (or just use a custom style sheet with a conditional tag).

then do something like this in your functions.php file:

add_action( 'my_styles_hook', 'wpse944_enqueue_style' );
function wpse944_enqueue_style()
    if ( ! is_singular() ) 

    // We use the current directory name as name for the stylesheet file & handle
    $name = dirname( __FILE__ );
        ,filemtime( get_template_directory()."/$name.css" )

So if you load this from the same subdirectory of your theme, then the you'll register an additional stylesheet named exactly like the current directory (the stylesheet remains in the themes root directory). This way you can easily style each page the way you want. Plus you don't load what you don't need.

Your Answer

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

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