<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WpFunc &#187; browser detect</title>
	<atom:link href="http://wpfunc.com/tag/browser-detect/feed" rel="self" type="application/rss+xml" />
	<link>http://wpfunc.com</link>
	<description>Awesome, Quick, Simple WordPress Functions!</description>
	<lastBuildDate>Thu, 01 Dec 2011 01:17:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Show Default Theme for IE6 Visitors!</title>
		<link>http://wpfunc.com/wordpress/show-default-theme-for-ie6-visitors.html</link>
		<comments>http://wpfunc.com/wordpress/show-default-theme-for-ie6-visitors.html#comments</comments>
		<pubDate>Thu, 24 Dec 2009 19:47:32 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[browser detect]]></category>
		<category><![CDATA[change theme]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=331</guid>
		<description><![CDATA[You can show &#8220;default&#8221; or &#8220;classic&#8221; theme for ie6 visitors. Because IE6 broke our themes and the other people themes. And alot of people use IE6. Let&#8217;s Begin&#8230;
Here is the code;
Insert this code to your Theme&#8217;s functions.php. With this code we will make Browser detection and we tell wordpress &#8216;Change theme to default if our [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">You can show &#8220;<em><strong>default</strong></em>&#8221; or &#8220;<em><strong>classic</strong></em>&#8221; theme for ie6 visitors. Because IE6 broke our themes and the other people themes. And alot of people use IE6. Let&#8217;s Begin&#8230;<span id="more-331"></span></p>
<h3>Here is the code;</h3>
<pre class="brush: php; title: ; notranslate">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;
}</pre>
<p style="text-align: justify;">Insert this code to your Theme&#8217;s <em><strong><span style="color: #ff0000;">functions.php</span></strong></em>. With this code we will make Browser detection and we tell wordpress &#8216;<span style="color: #ff0000;"><strong>Change theme to default if our visitors are use IE6!</strong></span>&#8216;.</p>
<p style="text-align: justify;">You can change &#8216;default&#8217; to classic or any theme name. You have to edit this lines for make changes.</p>
<pre class="brush: php; title: ; notranslate">$theme = 'default';</pre>
]]></content:encoded>
			<wfw:commentRss>http://wpfunc.com/wordpress/show-default-theme-for-ie6-visitors.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

