Add any Affiliate ads including #adsense ads in Middle of Post

Add any Affiliate ads including #adsecne ads in Middle of Post or Anywhere inside Blogger


In Blogger platform hasn't any opportunity to use plugins mobilize ad placement trick. But we can use JavaScript to display ads at the middle of the Blog post that can increase our ad revenue. Most of the returning Blog readers become ad blind, because they know where ads has placed in your site and they avoid that place. But by using this widget you can display ads in the middle of the Blog posts and readers will click on ads naturally.

we saw however, these methods would only work when we place the ads on predetermined and fixed locations. For posts area, the most common places are below the title, at the beginning of the post or at the end of it.

Manually inserting AdSense ads in the middle of posts in Blogger is pretty easy, just follow these steps below:

Adding Adsense Ads In the Middle or Anywhere inside Blogger Posts Before proceeding, it is recommended to backup your template: go to "Template" and click on the "Backup/restore" button to save a copy on your hard drive.


Step #1: Log in to your Blogger Account and go to Dashboard

Step #2: From vertical options click on Template - Edit HTML-

Step #3: Instantly locate <data:post.body/> by Pressing Ctrl+F (Windows) or CMD+F (Mac)
You will find this <data:post.body/>  code 3 or 4 times

Step #4: Once you find it then replace code by below script.


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


Add the converted Adsense code on where you see the <!-- Add here the code of your ad --> annotation, then save the changes by clicking on the "Save template" button.

Note: For centering the ads, add the <center></center> tags before and after the AdSense code, like this:
<div style="clear:both; margin:10px 0">
<center>
<!-- Add here the code of your ad -->
</center>
</div>

Adding the AdSense annotation to display the ad

When you create a New Post, add this annotation inside the "HTML" section to where you want the Google AdSense ads to appear:


<!-- adsense -->

For example

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


Please note that if you don't add this annotation to specify where to display the ad, then it will appear below the title by default.
So this is how we can add AdSense ads in the middle or anywhere inside our Blogger posts. Don't worry about violating the Google's Terms of Service because applying this method will not modify the ad' structure.

Contact Form

Name

Email *

Message *

Get on Your eMail

Developed By iliyas shaikh - the sarkar