Latest News

Disable AdSense Gadgets, On Static Pages

One problem with AdSense, that some blog owners have reported, is that AdSense ads are not permitted on pages with very little AdSense relevant content.

Unfortunately for some blog owners, the responsibility for preventing this is left to the blog owner.

Blogs with static pages, and AdSense gadgets in the sidebar, are a problem here. Static pages with little blog relevant content - such as label indexes, expanded owner profiles, special gadgets like Followers displays - cause problems with the AdSense ad classifier - and can cause blogs to lose ads.

As an AdSense publisher, the blog owner is expected to ensure that ads are not displayed on unsuitable blog pages.

Fortunately, it's not difficult to block AdSense ads from static pages. Just add a CSS rule with a "static page" conditional, to block display of each AdSense gadget.

<b:if cond='data:blog.pageType == "static_page"'>

If you want to block gadget "AdSense1" from displaying on all static pages, that's a simple CSS rule, added using "Add CSS".

Note that I wrote this to selectively block AdSense gadgets from displaying - but you can use it with any gadget, that you need to block. AdSense is simply one gadget that needs to be selectively displayed.


<b:if cond='data:blog.pageType == "static_page"'>
<style>
#AdSense1 {display: none !important;}
</style>
</b:if>


As always, be aware that the blank line above and below the code, as displayed here, is not intended to be decorative. Any time you add CSS rules, the blank line is required, to separate each CSS rule - and make each rule operational.

If the blog publishes actual blog content on some static pages, conditionals will be a bit more complicated. This is one more reason why static pages are not typically used for blog content.



Owners of #Blogger blogs with AdSense ads, that use static pages without AdSense relevant content, need to block ads from displaying on such pages. Failure to display ads selectively can cause problems with ads on the blog.

Fortunately, a simple CSS rule can be used, to block ads from static pages.

https://productforums.google.com/d/topic/blogger/7ANVOrQuvIo/discussion

https://productforums.google.com/d/topic/blogger/-p6mdLF2B08/discussion



No comments:

Post a Comment

Contact Us

24x7 online , we happy to answer you
tamilcypc@gmail.com , ,manoj960000@gmial.com.
skype: greeenchip

Disclaimer

This Blog and its TUT's are intended for educational purposes only, no-one involved in the creation of this TuT may be held responsible for any illegal acts brought about by this Blog or TuT.



Featured Post

Custom Domains And HTTPS Redirection Code