WordPress:从head标签中删除application / ld + json

时间:2016-06-16 11:05:39

标签: wordpress

如何使用php或javascript从wordpress页面删除下面显示的脚本标记。

<script type="application/ld+json">{"@context":"http:\/\/schema.org","@type":"BlogPosting","mainEntityOfPage":"http:\/\/domain.com\/190415-%d8%a5%d8%b0%d8%a7-%d9%83%d9%86%d8%aa-%d8%aa%d9%86%d9%88%d9%8a-%d8%b2%d9%8a%d8%a7%d8%b1%d8%a9-%d8%a3%d9%88%d8%b1%d9%88%d8%a8%d8%a7-%d9%87%d8%b0%d8%a7-%d8%a7%d9%84%d8%b5%d9%8a%d9%81%d8%8c-%d8%ad%d8%b3%d8%a7%d8%a8%d8%a7%d8%aa-%d8%a7%d9%86%d8%b3%d8%aa%d9%82%d8%b1%d8%a7%d9%85-%d9%87%d8%b0%d9%87-%d8%b3%d8%aa%d9%83%d9%88%d9%86-%d8%af%d9%84%d9%8a%d9%84%d9%83\/","publisher":{"@type":"Organization","name":"\u0634\u0628\u0643\u0629 \u0623\u0628\u0648 \u0646\u0648\u0627\u0641","logo":{"@type":"ImageObject","url":"http:\/\/domain.com\/wp-content\/uploads\/2016\/02\/favicon.png","height":32,"width":32}},"headline":"\u0625\u0630\u0627 \u0643\u0646\u062a \u062a\u0646\u0648\u064a \u0632\u064a\u0627\u0631\u0629 \u0623\u0648\u0631\u0648\u0628\u0627 \u060c \u062d\u0633\u0627\u0628\u0627\u062a \u0627\u0646\u0633\u062a\u0642\u0631\u0627\u0645 \u0633\u062a\u0643\u0648\u0646 \u062f\u0644\u064a\u0644\u0643","datePublished":"2015-04-20T19:14:41+00:00","dateModified":"2016-02-01T11:12:42+00:00","author":{"@type":"Person","name":"\u0645\u062d\u0631\u0631\u0661"},"image":{"@type":"ImageObject","url":"http:\/\/domain.com\/wp-content\/uploads\/2015\/04\/Europ.jpg","width":950,"height":534}}</script>

来自Head代码。

怎么做呢

1 个答案:

答案 0 :(得分:0)

取决于标签的注入位置。检查主题目录中的header.php文件,如果不是那个,请尝试逐个禁用所有插件以查看哪个插件添加了该标记。