Friday, November 6, 2009

How to add adsense ads just after the post title and after Post Ends in blogs.

It is always beneficial to show the ads just after the post title before the real content starts. But by default the ads are shown either in the sidebar or after the comment link at the bottom of the post. So many a time your visitors did not even give a look to the ads which is not desirable.
So what to do to make the adsense ads come just after the post Title and at the post bottom before the Comments or reaction buttons or anything else.

Follow the following steps and its all done... very easy indeed.


  1. Login to your blogger account and go to LAYOUT >> PAGE ELEMENTS (default) 
  2. Click on EDIT in BLOG POSTS (a pop-up window "configure blog posts" will open)
  3. Check the radio button  "SHOW ADS BETWEEN POSTS" at the last of "Post Page Option" in the pop-up.
  4. Scroll down and click on Ok (you can edit the colour of the ad displayed, its better to match the ad colour to your blog colour especially ad background and border must be same as blog background colour)
  5. Save the template by clicking on the BLUE button at the top right.
  6. Now click on EDIT HTML >> check " 
  7. Use Browser Text Search Feature using shortcut "Ctrl+F" and type in "adcode" to find <adcode> just after the comment section.
  8. Then add "!" before adcode like <!--adcode--> (this makes the defalut adcode as a comment for the browser and it will ignore it while interpreting the codes)
  9. Then Find  "<data:post.body/>" using "Ctrl+F".
  10. After and Before "<data:post.body/>" paste this code:
  11. <b:if cond='data:post.includeAd'>
    <data:adEnd/>
    <data:adCode/>
    <data:adStart/>
    </b:if> 
    
  12. Save the Template. Its All Done. Now after every each post title your ad will be shown and at the bottom also. To edit the type of ad size and colour see point 4. But its better to use a square size ad format.
  13. Best of Luck. Happy earning.
NOTE: Always Save your template before editing your HTML codes.