Home > Wordpress > Show default Wordpress theme if visitor uses Internet Explorer 6

Show default Wordpress theme if visitor uses Internet Explorer 6

I was looking for information on my forum and find a very interesting and easy with which you can display the default Wordpress theme for those who come to our site using Internet Explorer 6, which is an advantage for those who arrive using IE6 and can not view someplace good for this browser has problems, here the step to follow:

To achieve this you only have to add the following to your theme functions.php file (template):

add_filter(‘template’, ’serve_default_to_iesix’);
add_filter(‘option_template’, ’serve_default_to_iesix’);
add_filter(‘option_stylesheet’, ’serve_default_to_iesix’);
function serve_default_to_iesix($theme) {
if(strpos($_SERVER['HTTP_USER_AGENT'], ‘MSIE 6′) !== false)
$theme = ‘default’;
return $theme;
}

Source | AyudaWordpress (spanish)

  1. No comments yet.
  1. No trackbacks yet.