Well today we will be looking at how you can remove or exclude adsense ads to be loaded on specific post that might fall under the violation category in adsense.
Why we have to remove adsense ads from specific blogger post?
This might be another question arising in few readers mind that why the hell someone would lessen there earnings being made from there post, well that due to the policies lead by adsense that we cannot include adsense ad code on any post that might lead to copyright material, even posting some copyright based stuff is illegal and its very important that our ad code should not be present on any of that site or content or any article.
So with the trick mentioned below we can easily remove adsense ads from all those posts and stay safe while making money from other legal content we have posted.
Now this does not mean that you start posting so many illegal content that is not valid, but this should only be used for some articles that do not fall under harsh category but still could have few aspects that could lead to disablement of your adsense account.
Simple Script to Remove or Exclude AdSense Ads from any Specific Blogger Post
So lets get started to see how easily with a simple script can remove or exclude adsense ads from any specific blogger post.
- Make sure to enclose every single ad code you have applied in your template with the below code.
google_ad_client = "pub-xxxxxxxxxxxxxx";
google_ad_host = "pub-xxxxxxxxxxxxxxx";
/* 300x250 */
google_ad_slot = "xxxxxxxxxx";
google_ad_width = 300;
google_ad_height = 250;
- Your code looks something the above, just enclose it with the remove-ads div tag, this is the first step and this should be done to all the ad codes you have added in your template.
- After this your main work is done, now its time to select the posts from which you need to remove Google Ads, so select all those posts and then you need to press the Edit Post and then add below code right at the end of the post.
var Ads1 = document.getElementById('GoogleAds1');
- So add the above code and all your adsense ads that fall under the above mentioned DIV ID would remove.
- That’s it now save your post or Publish it and enjoy that post without the problem of content that might violate the adsense terms.
This is the best possible I came across to hide or remove adsense ads, I hope this works for you and you can easily stay safe from all that copyrighted content that might be violating adsense terms.