Pages

Monday, March 29, 2010

How to Place Adsense Ad Within Each Blogger Blog Post


Whenever I visited some well known blogs, I have found they had placed Adsense Ad within their post (as shown in the above pic). I long wanted to have this  in my blogger blog too. I did it today for my blogs. If you want to do the same, here is how to do it -





INSTALLATION




1. Get your adsense code, and Encode it before placing.
To do the encoding, you can use "Postable" or use other sites given here.

2. Now, go to Layout section and "Edit HTML" tab.

3. Its always recommended to download a backup of your template before making some changes. So download the template!

4. Click "Expand Widget Template" checkbox. 

5. Press "Ctrl+F" and find:

<data:post.body/>

If you are using "Expandable Post Summaries" in your template, then you'll find 

<p><data:post.body/></p> 
and infact two of them.
In that case, you are supposed to place the adsense code above the first

<p><data:post.body/></p>


6. Now Copy the code below and paste it just ABOVE the tag you searched in step 5.


<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div style='float:style="color: rgb(0, 0, 153);">center;padding:5px;'>
style="color: rgb(255, 0, 0);">

--- PLACE YOUR ENCODED ADSENSE CODE HERE ---
</div>
</b:if>


...Don't forget to replace the text in red with your encoded adsense ad code, that you have done in step 1.
These <b:if> and <div>tags will decide the alignment of your ad. So dont leave these while pasting the adsense code.

DONE! After doing this step, An adsense ad will be placed just below the title and above the text of EACH and EVERY post of your Blogger blog automatically.


Read the full article here  from tipsotricks.com if you want to know how to place more than one ad inside the post or how to customize the ad.


Stay updated with this blog: 
  • Subscribe to the Rss feed.
  • Follow Sourav's Diary in NetworkedBlog. 
  • Get updates through e-mail:





  • Enter your email address:


    Delivered by FeedBurner


Sourav Ghosh
Email: contact@souravghosh.com
Website: www.souravghosh.com


Chat Google Talk: souravghosh.besu Skype: souravghosh.ebiz MSN: souravji Y! messenger: souravghosh_besu Google Wave: souravghosh.besu@googlewave.com


Contact Me Twitter Facebook Orkut Blogger Digg Flickr Google Google Reader hi5 Linkedin MySpace Picasa Stumbleupon

blog comments powered by Disqus