WordPress文章标题”-“被转义

今天在看网站代码时,发现了一个奇怪的现象,就是文章标题中间(例如:七彩云博客<&#8211>专注网络及原创资源分享)变成该样子,这就很难受了,网上随便找下,发现这是wp转义的问题,那么找到了问题所在就肯定有解决问题的方法,下面咱们通过几行代码来禁用wp的转义即可。下面上代码:

//禁用部分WordPress转义
remove_filter('the_title', 'wptexturize');
remove_filter('wp_title', 'wptexturize');
remove_filter('single_post_title', 'wptexturize');

将上面的代码放到主题文件“functions.php”中即可。


七彩云博客 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:WordPress文章标题”-“被转义

您必须 登录 才能发表评论!

(7)个小伙伴在吐槽
  1. viagra cialis levitra ed https://cheapcialisll.com/ - Cheap Cialis Comprare Cialis In Spagna Cialis Viagra Deutschland Apotheke
    cheevog2020-06-29 02:20 Windows 8.1 | Chrome 67.0.3396.99
  2. Chemical Abuse http://aaa-rehab.com Drug Rehab Women'S Rehab Near Me http://chernousovajazz.ru/user/wavesoup1/
    Drug Abuse Rehabilitation2020-04-01 18:24 Windows 10 | Chrome 64.0.3282.140
  3. Christian Drug Rehab Near Me http://aaa-rehab.com Drug Rehab Affordable Alcohol Rehab https://www.show-score.com/member/crehab
    Rehabilitation Center Near Me For Drugs2020-04-01 02:30 Windows 7 | Chrome 67.0.3396.99
  4. Substance Abuse Rehab Centers Near Me http://aaa-rehab.com Drug Rehab Near Me Outpatient Drug Treatment Centers Near Me http://otakumode.com/arehab
    Va Substance Abuse Programs2020-03-31 10:34 Windows 10 | Chrome 66.0.3359.170
  5. Substance Abuse Rehab Centers Near Me http://aaa-rehab.com Drug Rehab Near Me Outpatient Drug Treatment Centers Near Me http://otakumode.com/arehab
    Va Substance Abuse Programs2020-03-31 10:34 Windows 10 | Chrome 66.0.3359.170
  6. Mens Rehab http://aaa-rehab.com Alcohol Rehab Near Me Drug Abuse Intervention http://forum.real-net.org/member.php?262960-Jamescob
    Alcohol Outpatient Programs Near Me2020-03-30 18:23 Windows 10 | Chrome 67.0.3396.79
  7. Drug Counseling Near Me http://aaa-rehab.com Alcohol Rehab Near Me http://aaa-rehab.com Alcohol Abuse Help Near Me http://aaa-rehab.com
    Drug Alcohol Rehab2020-03-27 12:47 Windows 10 | Chrome 67.0.3396.87