maybe you can somehow use template redirect? I’m not too clear on how it works, but it may be worth investigating.
function my_check_is_ie() {
global $is_winIE;
if ( ! $is_winIE ) return;
// load template for IE
include(TEMPLATEPATH . '/IE_template.php');
// or maybe?
if( is_home() ) include(TEMPLATEPATH . '/IE_home.php');
elseif( is_single() ) include(TEMPLATEPATH . '/IE_single.php');
// etc.
}
add_action('template_redirect', 'my_check_is_ie');
Edit– ok, I think I’ve figured it out. I haven’t tested this in the wild, so make sure it works first! You’ll have to make this a plugin, since once the theme is loaded it’s too late to pull the theme switch…
<?php
/*
Plugin Name: randomkljsaduiyerth
*/
global $is_winIE;
if($is_winIE){
add_filter('template', 'my_switch_themes');
add_filter('stylesheet', 'my_switch_themes');
}
function my_switch_themes(){
// return the name of your IE theme
return 'my-IE-theme-Name-Here';
}
Edit2–
you could add another check for the presence of a GET variable if you wanted to let people switch via a link like: http://yourdomain.com/?IE_version
if( isset($_GET['IE_version']) ):
// add_filter here, or better yet if you're doing a number of checks,
// set a flag if any check is true and add_filter last
endif;
you could also use cookies to store the theme preference
// check the cookie
if( isset($_COOKIE["my_domain_cookie"]) )
// set the cookie
setcookie("my_domain_cookie", "My Cookie Val", time()+60*60*24*30);