How to Avoid / Remove Adsense Ads from Homepage / Archive Page in Blog

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World

As per Google Adsense policy you are supposed to display 3 image and 3 links ads per page. But, if you set your blog home page with multiple items, normally the blogger will display ads for the first few posts and after the 3 ads it will show the empty slots in the homepage. This is applicable for the archive page with multiple items. The empty slots will give a bad look for your blog; moreover it is Adsense policy violation. You can get rid of this by implementing this sample code in your blog HTML.


Step 1
Login to your blogger and click on your blog
Step 2
          For old Blogger interface:
                    Click on Design Tab -> Edit HTML
Click Expand widget Templates
          For new Blogger interface:
                    Click on Blog -> Layout
Click Expand widget Templates

Step 3
          Wherever you wanted to display your ads you put the Adsense code in following piece of code which is marked in red color. This piece of code display ads only in the post item.
<b:if cond ='data:blog.pageType == "item"'>
     <Your Parsed Adsense Code>
</b:if>
Example:
<b:if cond ='data:blog.pageType == "item"'>
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-xxxxxxxxxx&quot;;
google_ad_host = &quot;pub-xxxxxxxxxxxxx&quot;;
/* 336x280_IM_TE */
google_ad_slot = &quot;xxxxxxxx&quot;;
google_ad_width = 336;
google_ad_height = 280;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;
</b:if>

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer