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

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

修改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的文件就没办法了。

Categories: Uncategorized Tags: ,
  1. No comments yet.
  1. No trackbacks yet.
请注意:如果您回复的跟博文无关,一律当成垃圾评论,不要心存侥幸,以免浪费大家的时间!谢谢