Thursday, 30 November 2017

How to add Adsense Ads in the middle or anywhere inside the blogger posts

This is complete guide for how to add Adsense ads in blogger posts

First step

<data:post.body/>

Search above code in template by pressing Cnt+F 



Second step

replace this code (second one, if not work then replace third one) with following code, 



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


Third step


paste adsense ad code at  <!-- Add here the code of your ad -->

To keep ad in center of post


<div style="clear:both; margin:10px 0">
<center> 
<!-- Add here the code of your ad -->
</center>
</div>


Fourth step

add <!-- adsense --> in the post where you wish to display ads 

<!-- adsense -->

This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text.<br /><br /> <!-- adsense -->This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text.




This was the clear explanation for the following questions
How to add Adsense Ads in the middle or anywhere inside the blogger posts
how to add adsense code in blogger post
how to put adsense in the middle of blogger post
how to add ads between posts in blogger
how to put google adsense below post title in blogger?
how to insert ads within your post content in blogger
how to paste adsense code in blogger
adsense ad code converter
how to implement ad code on blogger
parse adsense code





Previous Post
Next Post

post written by:

0 comments: