image_pdfimage_print

How to Put Adsense Ads Middle of the Every Pages and Posts

It is too important to optimize your adsense ads in your site.  In the earlier post, we found how to put adsense ads just below the post title. Now we are going to learn how to put adsense ads in the middle part of the post and any place within the... Read More | Share it now!

It is too important to optimize your adsense ads in your site.  In the earlier post, we found how to put adsense ads just below the post title. Now we are going to learn how to put adsense ads in the middle part of the post and any place within the post. Often adsense user think if the ads are displayed in the just below the post title, it is the best position. Moreover that there is also a place which is equally as better as below the post title. This is the middle position of the posts.

Let see how we can add ads middle of the post page.


Suggestion:-We always recommend to back up your template before changing any elements of your templates.

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

Your Ad Code Text
</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

Convert the adsense code(Adsense Ad Code Converter )AND Replace The Place Your Ad Code Text With Your Adsense Ad Code in the above code and save your template.Maybe you dont knowThe horror stories of the AdSense Policy team.Congratulation you did it. This techniques is preferred by google’s terms and services.

Hide Affiliate link from the status bar

Hide AffiliateDo you want more readers to click through your affiliate link?You know,you have to start thinking about increasing your CTR(Click-Through Rate)because the more CTR you have,the more conversion you can possibly get.The more conversion,the more commission.But that not enough.In this article, we will explain how to do that, and how you can hide affiliate links .  Continue reading

How To Disable Highlight Function

Disable HighlightHow To Disable Highlight Function To write a very constructive blog content is a very hard work,which some bloggers don’t understand what it takes, all they are looking for is where to copy content for their blog,which is really a very bad act,especially when your copied content is ranking higher than your original content.I can remember when i first started blogging,it took me 10-15 mins before i can actually figure out where to start my write-up,but seems to be getting easier as time goes on. Continue reading

image_pdfimage_print