Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

wordpress中文标签失效、点击空白或404的解决方法

wordpress建站后,在给网站进行优化时,往往为加上标签,而加上中文标签后,点击是没有达到想要的效果,没有给中文标签归类,点击标签是无效的,要么显示404,要么就是返回首页,或空白页

解决这样问题的方法如下:

首先找到wordpress的“wp-includes”目录下的“class-wp.php”文件,进行如下修改即可完美解决。

解决wordpress中文标签问题

解决wordpress中文标签问题

1、找到:

$pathinfo = isset( $_SERVER['PATH_INFO'] ) ? $_SERVER['PATH_INFO'] : '';修改为:$pathinfo = isset( $_SERVER['PATH_INFO'] ) ? mb_convert_encoding($_SERVER['PATH_INFO'], 'utf-8', 'GBK') : '';2、找到:list( $req_uri ) = explode( '?', $_SERVER['REQUEST_URI'] );修改为:list( $req_uri ) = explode( '?', mb_convert_encoding($_SERVER['REQUEST_URI'], 'utf-8', 'GBK') );
 
发表评论

相关文章