[wp-hackers] site sections, distinct theme per section

Brian Fegter brian at fegter.com
Fri Jul 8 14:06:53 UTC 2011

If I had to do this, I would place all of my themes in one basket - inside
the main theme. I would use the base page.php, single.php etc... as an
include engine to identify the context and then include the specified theme
parts. You could get more complex per template such as if(is_page('foo'))
get_theme_template_part(2, 'page', 'front');

Basic file structure of your theme:

   - root - basic WP files only - page.php, single.php etc... I would not
   use any other assets here (css, images, js, etc) - make sure you have all
   the contextual template parts here to fully control the theme (search,
   category, tag, author, etc...)
   - /themes/
      - /theme-1/
      - /theme-2/
      - /theme-3/

Basic functions you would need to build:

   - get_theme_functions($theme_number)
   - get_theme_template_part($theme_number, 'slug', 'name')

I would caution you to make your base theme extremely light. You don't want
to be loading two heavy-weight themes over the top of each other. This is
purely theoretical. I've never tried anything of this nature. Let me know
how it goes.


More information about the wp-hackers mailing list