How To Add AdSense Ads In the Middle of Post In Blogger – Works in Any Template

How To Add AdSense Ads In the Middle of Post In Blogger

Placing Ad Units in the Middle of Blog Posts will give you High CTR and more exposure from Visitors, Which will also eventually increases your Earnings.In WordPress, there are many Ready to use Plugins for Adding Ads inside or Middle of Posts. But to add Ads in the middle of Posts in Blogger is a bit tricky task.

Today in this Article, I’m sharing a Custom developed Script for Blogger, By which you can actually Show Ads in Middle of Posts in Blogger.It is completely easy to use, all you want to do is to Replace an existing code from your Template with the below given Code.

Check: How To Add Adsense Ads Below Post Title In Blogger Post

How to Place Ads in Middle Of Post Blogger

Login to your Blogger Account

Step 1: Go to Templates > Edit HTML

Step 2: Search for below code in your template.

<data:post.body/>

 You can use Ctrl+F function to launch Search Box inside Template Editor

You will find this code multiple times in your Template, You have to select second or Last occurance of the same code.

Step 3: Replace the above Code with the below Code.

<div id='jobmiddlenew'>

<data:post.body/>

</div>

<b:if cond='data:blog.pageType == &quot;item&quot;'>

<style>
#addcodemiddle{display: none;}
</style>
<div id='addcodemiddle'>

Place Your Ad Code Here

</div>

<script type='text/javascript'>


var str1=document.getElementById(&quot;jobmiddlenew&quot;).innerHTML;
var str2=str1.length;
var str3=str2/2;
var substr = str1.substring(str3, str2);

var n = substr.search(&quot;&lt;br&gt;&quot;);
if(n&lt;0)
{
n = substr.indexOf('.');
if(n&lt;0)
{
n=0;
}
var firsthalf = str1.substring(0, str3+n+1);
var secondhalf = str1.substring(str3+n+1, str2);

}
else
{

var firsthalf = str1.substring(0, str3+n+4);
var secondhalf = str1.substring(str3+n+4, str2);
}
var addcode=&quot;<center>&quot;+document.getElementById(&quot;addcodemiddle&quot;).innerHTML+&quot;</center><br/>&quot;;

var newbody=firsthalf+addcode+secondhalf;


var strnew=document.getElementsByClassName(&quot;post-body entry-content&quot;);
strnew[0].innerHTML=newbody;

document.getElementById(&quot;addcodemiddle&quot;).innerHTML=&quot;&quot;;

</script>

</b:if>


Step 4: Replace “Place Your Ad Code Here” with your AdSense Ad code.

If you are facing any problem let us know, Comment down Below your Doubts. 🙂

Check: A Complete Guide to Optimize Google Ads and Maximize your AdSense Earnings
            Top 5 Most Paying URL Shortener Sites to Make Money Online
            How to Get A Website/Blog Approved and Listed in Google News Tips & Tricks
            How To Setup AdSense Page-level Ads in WordPress & Blogger Blogs?

About Astro Joseph

Hi, I'm Astro Joseph the founder and CEO of IPEE World and IPEE Network.I started this blog for a passion and it is now empowering millions of readers around the globe.Read more about me at About and Contact page.

Leave a Reply

Your email address will not be published. Required fields are marked *