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';
- Wordpress















Made by Symmetric Web
Distributed by Smashing Magazine
3 Responses
What if I want to hide various posts? How do I go about that?
@Udegbunam Chukwudi
You want to hide posts from IE6 users?. I will try some code.
[...] 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 [...]