Win主机下wordpress不支持中文tag标签解决办法

转自点点 10 年前 回复

, , , ,

今天WP中文论坛一网友问我win主机下wordpress不支持中文标签问题如何解决,GOOGLE之,解决办法如下:
修改wp-includes/rewrite.php

win主机下wordpress不支持中文标签的解决办法

    function get_tag_permastruct() {
        if ( isset($this->tag_structure) )
            return $this->tag_structure;
        if (  empty($this->permalink_structure) ) {
            $this->tag_structure = '';
            return false;
        }
        if ( empty($this->tag_base) )
            $this->tag_structure = trailingslashit( $this->front . 'tag' );
        else
            $this->tag_structure = trailingslashit( '/' . $this->root . $this->tag_base );
        $this->tag_structure .= '%tag%';
        return $this->tag_structure;
    }

        if (  empty($this->permalink_structure) ) {
            $this->tag_structure = '';
            return false;
        }

这里的判断加个 ! 号即可 ,即变成 :

        if (  ! empty($this->permalink_structure) ) {
            $this->tag_structure = '';
            return false;
        }

From:http://www.ihacklog.com/wordpress/problems/solution-to-wordpress-chinese-tag-problem-under-win-server.html

支付宝打赏微信打赏

如果此文对你有帮助,欢迎打赏作者。

发表评论

欢迎回来 (打开)

(必填)

7356