advertisements
_____________________________________________________________________________________________________________________
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"'>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-xxxxxxxxxx";
google_ad_host = "pub-xxxxxxxxxxxxx";
/* 336x280_IM_TE */
google_ad_slot = "xxxxxxxx";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</b:if>
_____________________________________________________________________________________________________________________
0 comments:
Post a Comment