如何从所有wordpress帖子页面中查找和替换Google adsens代码?

问题描述

我有以下代码放在wordpress中DIVI插件代码块中。

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Responsive -->
<ins class="adsbygoogle"
 style="display:block"
 data-ad-client="ca-pub-998213xxxxxxx"
 data-ad-slot="2844xxxxxx"
 data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

我想用相同的代码来更改它,但是要使用内联代码(如follpwing)进行内联。

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Responsive -->
<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-998213xxxxxxx" data-ad-slot="2844xxxxxx" data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

因为在获取应用程序中的所有帖子时,它显示了以下内容行:

style="display:block" data-ad-client="ca-pub-998213xxxxxxx" data-ad-slot="2844xxxxxx" data-ad-format="auto"> My Post Content.............

如何用内联代码替换整个WordPress网站代码

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)