问题源头请自已睇“\wp-includes\formatting.php”内的函数“function wptexturize($text) ”
|
$static_characters = array_merge( array('---', ' -- ', '--', ' - ', 'xn–', '...', '``', '\'\'', ' (tm)'), $cockney ); |
方法一:直接加条件(唔建议咁做,WP升级后你又要改多次)
|
//ztj begin modify if (is_single()) { $static_characters = array_merge( array('xn–', '``', '\'\'', ' (tm)'), $cockney ); } else { $static_characters = array_merge( array('---', ' -- ', '--', ' - ', 'xn–', '...', '``', '\'\'', ' (tm)'), $cockney ); } //ztj end modify |
方法二:系你主题的“single.php”里边加一行
|
remove_action( 'the_content', 'wptexturize' ); |
加系边都得,不过一定要系“the_content”之前就得了。... [查看更多]