WordPress中输入两个"--"的时候会识别成一个横杠,如果此时的文章中有代码在,那么其他人在复制粘贴的时候就没法使用。

functions.php加入:

//取消内容转义
remove_filter('the_content', 'wptexturize');
//取消摘要转义
remove_filter('the_excerpt', 'wptexturize');
//取消评论转义
remove_filter('comment_text', 'wptexturize');

参与评论