Thursday, February 17, 2011

How to display google ads just below or above the single post only(On clickking the blogger post from home screen)

Hi, all you must have seen some blogs shows the advertisements only above,below or both in a single post.
to achieve we need to do slight modification in your blogger HTML code.

Here are the steps.

1)First Go to google adsense & get the google adsense code of the sort (image or Text or both) you wish
2)Convert the google adsense code which is in Java script to HTML format using converter
3)Log in to your blogger, go to Design tab, then go to EditHTML,Then click on  "
4)Search for " <data:post.body/>" tag, 
5)If you want ads to display above the post place the code snippet present in the next step just above the <data:post.body/> tag, or if you want to show below the blog post place it after the <data:post.body/> tag,

6)   <b:if cond='data:blog.pageType == &quot;item&quot;'>
     <div style='float: left;'>
  /* Converted HTML form of adsense code*/
    </div>
    </b:if>

7) Save the template & check the preview, on home screen of blogger you wont find ads below or above, now  click on any post, you will find the google ads displaying above or below the post.

Happy blogging

No comments: