views:

10

answers:

0
function theme_based_on_domain( $template = '' ) {
   if ( preg_match( '/\S*\.?mydomain\.com/', $_SERVER['HTTP_HOST'] )) {
     $template = 'ImpreZZ';
   } 
   return $template;
 } 

 add_filter('stylesheet', 'theme_based_on_domain');
 add_filter('template', 'theme_based_on_domain');

I have this in my theme directory right now and the stylesheet is being applied totally fine whereas the template filter just isn't working at all. Any idea why?