IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    如何设置博客上的某篇日志不显示Google Adsense广告

    尚磊发表于 2017-03-17 06:14:05
    love 0

    收到Google Adsense的提醒邮件,我博客上的一篇日志存在某些内容违反了她们的相关原则,要求我做出调整。

    我细看了一下,其中一片日志包括了某些内容的下载,所以出现了违规提醒。删除那篇日志有些可惜,就开始寻找办法,看看是否可以只禁用那一篇日志的Google Adsense广告的展示。

    因为此前我的博客使用了“Easy Plugin for AdSense”这个Google Adsense插件,研究了一番,发现其实插件本身是提供这个功能的。

    If you want to suppress AdSense in a particular post or page, give the comment “<!–noadsense–>” somewhere in its text.

    Or, insert a Custom Field with a key “adsense” and give it a value “no”.

    Other Custom Fields you can use to fine-tune how a post or page displays AdSense blocks:

    Keys:
    adsense-top,
    adsense-middle,
    adsense-bottom,
    adsense-widget,
    adsense-search

    Values:
    left,right,center,no

    于是,我就在那篇日志的内文中加入了:

    <!–noadsense–>

    问题就解决了。


    如何设置博客上的某篇日志不显示Google Adsense广告 was first posted on 三月 17, 2017 at 2:14 下午.
    ©2016 "尚磊的博客". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement. Please contact me at eflyingxp#gmail.com


沪ICP备19023445号-2号
友情链接