Show Default Theme for IE6 Visitors!

You can show “default” or “classic” theme for ie6 visitors. Because IE6 broke our themes and the other people themes. And alot of people use IE6. Let’s Begin…

Here is the code;

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;
}

Insert this code to your Theme’s functions.php. With this code we will make Browser detection and we tell wordpress ‘Change theme to default if our visitors are use IE6!‘.

You can change ‘default’ to classic or any theme name. You have to edit this lines for make changes.

$theme = 'default';

Related posts:

If you enjoyed this post, make sure you subscribe to my RSS Feed
  1. Jun 10th, 2010 at 23:23 | #1

    What if I want to hide various posts? How do I go about that?

  2. Jun 11th, 2010 at 11:29 | #2

    @Udegbunam Chukwudi
    You want to hide posts from IE6 users?. I will try some code.

Comments are closed.
Highslide for Wordpress Plugin