Place Adsense Ads Middle of Blogger Posts / Wherever You Want

google adsense

How to place Adsense ads middle of Blogger posts or wherever you want, default blogger platform doesn't offer a way to break a post in the middle and put there an ad. There's a limit how many ads on a single page. Check below more explanations.

How many ads can be displayed in a single page?

  • Up to three ad units
  • Two AdSense for search boxes
  • Up to three link units


How to place Adsense ads middle of Blogger posts?

01. Go to your blogger Design, Edit HTML, click on Expand Widget Templates and find <data:post.body/>.

02. Now replace above code with following one

<div expr:id='"aim1" + data:post.id'></div>

<div style="clear:both; margin:10px 0">

<!-- Your AdSense code here -->

</div>

<div expr:id='"aim2" + data:post.id'>

<data:post.body/>

</div>

<script type="text/javascript">
var obj0=document.getElementById("aim1<data:post.id/>");
var obj1=document.getElementById("aim2<data:post.id/>");
var s=obj1.innerHTML;
var r=s.search(/\x3C!-- adsense --\x3E/igm);
if(r>0) {obj0.innerHTML=s.substr(0,r);obj1.innerHTML=s.substr(r+16);}
</script>


03. Don't forget to replace your adsense code with <!-- Your AdSense code here --> (blue color code)

04. Now save your template.

05. Now when you write a new blogger post, insert below piece of code wherever you want to appear the adsense ad.

<!-- adsense -->


Check sample screenshot below.

adsense ads middle blogger post

Now you have placed Adsense ads middle of Blogger Posts.

Related Posts



0 comments: