Posted by KaiseRCrazY on 24th December 2009

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';
  • del.icio.us
  • Digg
  • Facebook
  • FriendFeed
  • Reddit
  • StumbleUpon
  • Technorati
  • PDF
  • Print

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

    3 Responses

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

  2. KaiseRCrazY says:

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

  3. [...] içerisinde IE6 için varsayılan temayı göstermek ile ilgili varolan bir yazının altına yorum olarak IE6 kullanıcılarına yazılarımı nasıl göstermeyebilirim diye bir soru gelmiş. Bende [...]

Post your comments