<?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>等待喝彩_OnEcho &#187; 中文标签</title>
	<atom:link href="http://www.onecho.com/tag/%e4%b8%ad%e6%96%87%e6%a0%87%e7%ad%be/feed" rel="self" type="application/rss+xml" />
	<link>http://www.onecho.com</link>
	<description>http://www.onecho.com  回声的启示</description>
	<lastBuildDate>Fri, 16 Jul 2010 14:18:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WordPress标题不显示中文标签的解决办法</title>
		<link>http://www.onecho.com/2008-09-17/381.html</link>
		<comments>http://www.onecho.com/2008-09-17/381.html#comments</comments>
		<pubDate>Wed, 17 Sep 2008 08:41:28 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[中文标签]]></category>

		<guid isPermaLink="false">http://www.onecho.com/2008-09-17/381.html</guid>
		<description><![CDATA[最近发现wordpress的一个bug，就是按标签查看时，如果标签含有中文，在页面的标题，也就是title没有显示所选标签。那如何解决呢？]]></description>
			<content:encoded><![CDATA[<p>最近发现wordpress的一个bug，就是按标签查看时，如果标签含有中文，在页面的标题，也就是title没有显示所选标签。那如何解决呢？</p>
<p>下面是我的方法：</p>
<p>首先修改.htaccess 文件加上<br />
RewriteRule ^tag/(.*)$ /index.php?tag=$1 [L] <br />
#说明：(.*)即使匹配所有包括中文和英文的标签值，然后把匹配后的值放在$1里面</p>
<p>也就是每个标签的页面跳转到index.php?tag=$1，这样我们就能通过GET方法等到这个标签的title了</p>
<p>然后我们打开主题对应文件夹下面的header.php页面,在&lt;title&gt;标签里面加上这段，如</p>
<pre class="ruby" name="code">&lt;title&gt;
&lt;?php wp_title('');
if ($_GET['tag']) echo $_GET['tag'];
if (is_search() ) { ?&gt;
 搜索 &lt;?php echo $s; }
if ( !(is_404()) and (is_search()) or (is_single()) or (is_page()) or (function_exists('is_tag') and is_tag()) or (is_archive()) ) { ?&gt;
&amp;raquo; &lt;?php }  ?&gt;
&lt;?php bloginfo('name'); ?&gt;
&lt;/title&gt;</pre>
<p>这时不管打开的是中文或者英文的标签，都可以在标题上面正常显示了^_^ Good Luck</p>
]]></content:encoded>
			<wfw:commentRss>http://www.onecho.com/2008-09-17/381.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
