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
Comments are closed.
Highslide for Wordpress Plugin