WordPress解决中文标签失效的问题

This entry was posted by 老猫 Tuesday, 21 July, 2009

修改wp_includes里的rewrite.php
这是网上最常见的方法,原理是,让WordPress在对其他内容使用Permalink的时候,对tag不使用,而使用链接2的QueryString模式发送中文编码:
function get_tag_permastruct() {
if (isset($this->tag_structure)) {
return $this->tag_structure;
}
if (empty($this->permalink_structure)) { //—–this line need change——
$this->tag_structure = ”;
return false;
}
把第5行改为
if (!empty($this->permalink_structure)) {
局限:没有起到Permalink的“漂亮”作用,如果不能自己修改WP的文件就没办法了。


Leave a Reply