WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to load a different theme for those users who still use IE 6 - 7 - and 8 any plugin or code?

share|improve this question
Don't forget to set Cache-Control: private because you have to break every other cache to make browser sniffing work. It would better tough just to learn CSS. ;) – toscho Apr 11 '12 at 2:17

Drop this inside a plugin:

add_filter('template', function($template){

  // could be IE
  if(preg_match('/MSIE [1-9]/i', $_SERVER['HTTP_USER_AGENT']))
    return 'your_ie_theme_name';

  // other
  return $template;


Just so you know, browser detection trough PHP is not really that accurate. There's a get_browser() function available PHP, not sure if it's any better though.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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