How to Install Ads Between Posts in Blogger | Fast & Easy | 2022

Hello, guys welcome to this UX blog today we are going to discuss that how to install ads between posts in blogger, it’s a very easy and simple process to install ads between posts. So let’s see why we need ads between our posts and how to install ads between posts.

Ads Between Posts
Ads Between Posts

Ads Between Posts

We already know that many blogger templates provide a visit to place ads between posts, but the problem is the widget provided by the template is not working properly sometimes it shows ads, and sometimes it’s not showing ads, so because of this problem if we can see a decrease in our earning. So we have to fix this problem to increase our earnings.

How To Install Ads Between Posts
How To Install Ads Between Posts

How To Install

It’s a very easy and simple process to install ads between blogger posts, I have mentioned all the steps below you can just follow them and stall at between posts in blogger very easily. Just have to find and replace the codes given below to properly install ads between posts in blogger.

Steps:

  1. Go to Blogger.com
  2. Then go to Themes and Edit HTML
  3. After that find this code given below
<data:post.body/>
  1. And then, replace this code with given below code
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div class='middleAds ads_middle' id='middleAds1'>
<div style='clear:both;'>
<!-- middle ads1, your AD code put below -->
</div>
</div>
<div class='middleAds ads_middle2' id='middleAds2'>
<div style='clear:both;'>
<!-- middle ads2, your AD code put below -->
</div>
</div>
<div class='middleAds ads_middle' id='middleAds3'>
<div style='clear:both;'>
<!-- middle ads3, your AD code put below -->
</div>
</div>
<div id='tgtPost'><data:post.body/></div>
<script type='text/javascript'> function insertAfter(tbh,tgt) {
var prt = tgt.parentNode;
if (prt.lastChild == tgt) {prt.appendChild(tbh);}
else {prt.insertBefore(tbh,tgt.nextSibling);}}
var tgt = document.getElementById(&quot;tgtPost&quot;);
var midAd1 = document.getElementById(&quot;middleAds1&quot;);
var midAd2 = document.getElementById(&quot;middleAds2&quot;);
var midAd3 = document.getElementById(&quot;middleAds3&quot;);
var showAd1 = tgt.getElementsByTagName(&quot;br&quot;);
var showAd2 = tgt.getElementsByTagName(&quot;p&gt;&quot;);
var showAd3 = tgt.getElementsByTagName(&quot;p&gt;&quot;);
if (showAd1.length &gt; 0) {insertAfter(midAd1,showAd1[3]);}
if (showAd2.length &gt; 0) {insertAfter(midAd1,showAd2[3]);}
if (showAd3.length &gt; 0) {insertAfter(midAd1,showAd3[3]);}
if (showAd1.length &gt; 0) {insertAfter(midAd2,showAd1[8]);}
if (showAd2.length &gt; 0) {insertAfter(midAd2,showAd2[8]);}
if (showAd3.length &gt; 0) {insertAfter(midAd2,showAd3[8]);}
if (showAd1.length &gt; 0) {insertAfter(midAd3,showAd1[13]);}
if (showAd2.length &gt; 0) {insertAfter(midAd3,showAd2[13]);}
if (showAd3.length &gt; 0) {insertAfter(midAd3,showAd3[13]);}
</script>
</b:if>
  1. At last, Add this CSS above ]]></b:skin>
.middleAds{display:block;margin:15px auto;padding:0;width:100%;height:auto;overflow:hidden;text-align:center}

Congratulations you have successfully installed ads between posts in blogger.

Conclusion
Conclusion

Conclusion

So this is the tutorial on How to Install Ads Between Blogger Posts. See your next posting. Good luck!

Read More:

Leave a Comment