Codes needed for the video How to add google adsense ads in the middle of the blogs


1. Go to template and search for the tag. You will find two, the one you will need is the second one at the bottom:

<data:post.body/>   



2. Replace the whole tab with the codes below:

<div expr:id='"adsmiddle1" + data:post.id'></div>  
 <b:if cond='data:blog.pageType == "item"'>  
 <b:if cond='data:blog.pageType != &quot;static_page&quot;'>  
 <div style="clear:both; margin:10px 0">  
 <!-- Add here the code of your ad -->  
 </div>  
 </b:if>  
 </b:if>  
 <div expr:id='"adsmiddle2" + data:post.id'>  
 <data:post.body/>  
 </div>  
 <script type="text/javascript">  
 var obj0=document.getElementById("adsmiddle1<data:post.id/>");  
 var obj1=document.getElementById("adsmiddle2<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>  

3. Here is the code for adding your google adsense ads in your posts HTML. You have to add this tag to have the ads show, or there will have no ads in the post page.

<!-- adsense -->  

4. Here is the link for converting your google adsense codes: