Tuesday, 25 August 2009

Insert Adsense Block in the Middle of the Blogger post


Go to your blogger account, and navigate to Layout >> Edit html, and check check Expand Widget Templates

Find the tag :


<data :post.body/>
 


And replace it with the following code.


<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>




Note that you must replace


<!-- Your AdSense code -->




Now you are done, just to put your google adsense block in the middle of the post, you have to put this code in the exact place you want to put AdSense block.

Seja o primeiro a comentar

Post a Comment

Followers

BLOGGER TRICKS © 2008 Template by Dicas Blogger.

TOPO