此处广告位出售

WordPress文章标题”-“被转义

WordPress 云上的幻象 11个月前 (05-19) 319次浏览 6个评论 扫描二维码

今天在看网站代码时,发现了一个奇怪的现象,就是文章标题中间(例如:七彩云博客<&#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文章标题”-“被转义
喜欢 (0)
[[email protected]]
分享 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
(6)个小伙伴在吐槽
  1. 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
  2. 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
  3. 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
  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. 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
  6. 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