How To Place Adsense Ads In Middle of The Post in Blogger Template - Sotuntech | Explore the World of Technology

Breaking

Updates Via SMS?? Text FOLLOW Sotuntech to 40404 to Get Them 4 Free
Own A Blog Like This
For Questions, Inquiries, Click Here
Page | Group - Follow us - Call us - Hire Us - 9jatechspot@gmail.com

Sunday, 9 December 2018

How To Place Adsense Ads In Middle of The Post in Blogger Template

The wish of every blog owner is to maximize his/her ad revenue y placing it in strategic places on the blog. Placing of ads on the blog has become a real problem to solve for most blog owners because the revenue you generate from your add company depends on its visibility on your blog or website which in turn means the ads placement has now take a huge importance unlike before.

Today, i am going to be teaching or showing you an effective way to place your ads in the middle of your post in any template you choose to use for your site. Most bloggers use google adsense ad network, so that's what i will be using to give this tutorial. Just follow the steps below to place any ads in the middle of your post successfully.


Also read: How To Add Automatic Copyright Year To A Blog Footer

Place Adsense Ads Automatically In Middle of All The Posts In Blogger:

Follow The below process to place adsense ads in Middle of all the posts automatically in blogger.

Step 1:

Login to Your Blogger Account
Go to Template >Edit HTML

Step 2:

Search For Below Code in your template.
<data:post.body/>
You will get multiple codes similar to above code. You have to select the second code which is similar to above code in order to make the script work properly.

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 The Place Your Ad Code Text With Your Adsense Ad Code in the above code and save your template.

Enjoy and Share

Recommended for you:  Steps on How To Add Random Posts Widget To Blogger

No comments:

Post a Comment

What do you have to say about this post? Kindly drop your comment(s) here!.. Tick the notify me box to get a notification when you get a response to your comment.. Join Us On Telegram Group here and Whatsapp Group Here For Latest Update and Discussion

We appreciate your comment(s)