Place AdSense Ad Unit In Various Positions Inside Within Blogger Post Contents
There is trick to add Google AdSense and other advertising network such as AdBrite ad unit right beside and inside within Blogger post content, so that the ad block will appear wrapped and floated inline to the top left or top right next to the blog text. If you do not like this layout and dislike the prominent location the ads are displayed, there are other places within blog post to put the ad code.
The guide below provides tips and tricks on where should the parsed HTML ad code (after replacing several special characters with HTML code) be pasted and inserted in the Blogger XML-based template. In essence, the steps are exactly the same when positioning the ad next to and within post content, except that the text string to search (where to paste the ad code) is different.
To recap, go to Blogger Template tab for the blog you want to change, then click on Edit HTML. Remember to tick Expand Widget Templates check box, and perform the backup.
Wrap Around Next to the Post and Float to Left or Right
Refer to this guide.
After Post Title Before Post Contents
The ad banner will appear below post title but above and before the start of blog content. It’s actually exactly the same with tip above to wrap AdSense around the post, except that now the ad unit does not float but instead been place at the center without wrapping, and thus pushing content below it.
Search for the line of:
<p><data:post.body/></p>
Paste the parsed Google AdSense ad code inside <center><div> and </div></center> right before the above line so that it looks like below after change:
<div class=’post-header-line-1′/>
<div class=’post-body entry-content’>
<center><div>[parsed Google AdSense ad code]</div></center>
<p><data:post.body/></p>
<div style=’clear: both;’/> <!– clear for photos floats –>
</div>
After Post Content Before Footer Credits
The Google AdSense ad unit or other display ads banner will appear at the bottom of the blog post, after the end of content and just before the ending credits, within inside the post.
Search for:
<div class=’post-footer’>
Paste the parsed Google AdSense ad code inside <div> and </div> right before the above line so that it looks like below after change:
<div class=’post-body entry-content’>
<p><data:post.body/></p>
<div style=’clear: both;’/> <!– clear for photos floats –>
</div>
<div>[parsed Google AdSense ad code]</div>
<div class=’post-footer’>
To center the ads unit, add the wrapper of <center> and </center>.
After Footer Credits
Unlike the above where the ad unit appear before the credit right after post content, this time the ad unit will appear after the credit for the post is displayed. The easiest way to achieve the task is using built-in feature of “Show Ads Between Posts” in Blogger. Turn off and enable the feature will display ads between posts when view in home, index or category pages, and also at the bottom most part when view in single individual post page view.
If you plan to use non-AdSense ads or want to add in custom channels, you have to manually edit the template HTML to add in the ad code. In this case, search for:
<p class=’post-footer-line post-footer-line-3′/>
Paste the parsed Google AdSense ad code inside <div> and </div> right after the above line so that it looks like below after change:
<p class=’post-footer-line post-footer-line-3′/>
<div>[parsed Google AdSense ad code]</div>
</div>
</div>
</b:includable>
To center the ads unit, add the wrapper of <center> and </center>.
Between Posts
After it’s pretty much similar to the above where ads appear after post footer. So just follow tips above.
Related Articles
- Move Blogger Inline Ads Between Posts to Inside Within Post Position
- How to Wrap AdSense Ads Around and Inline Beside Blogger Post Content
- google_ad_host Host ID in Google AdSense Ad Unit Code and Revenue Sharing
- How to Hide and Collapse Google AdSense Ad Unit Instead of Showing Public Service Ad (PSA)
- Trick to Add AdSense, AdBrite and Other JavaScript Ad Code Directly to Blogger HTML Template
- Workaround to Add Custom Channels into Blogger AdSense Page Element Widget
- Implement Ad Revenue Sharing in Blogger (Supports Google AdSense And Any Code)
- Add and Insert to Put Google AdSense Ads Units Between Blog Posts in Blogger.com
- AdSense Help Group for AdSense Publishers
- How to Display Elements (Ads) Only On (Or Only Not At) Individual Single Post Item View










































September 10th, 2009 04:15
Hi, I tried pasting the code using the “After Post Title Before Post Contents” technique for my Adbrite codes. I saved and view the blog to confirm what I have done. It appears that there are the sentence “Your ad here” by Adbrite after every post. The code has just been activated so I cannot see any ads yet. Here is my question.
1. Is this normal?
2. How can I display only 1 ads at the top post but not for every posts?
Thanks.
August 29th, 2009 03:32
I want to add adsense inside post just like this:
—————————————————
—————————————————
—————————————————
google adsense google adsense google adsense
————————————————–
————————————————–
—————————————————
How can i do ? thank u.
August 24th, 2009 14:15
Nice trick.. Thank’s