How To Add Together Adsense Ads Inwards The Optic Or Anywhere Within Blogger Posts
Thursday, February 20, 2020
Edit
In a previous post, nosotros saw how together with where nosotros tin house Adsense ads on our blog; however, these methods would solely operate when nosotros house the ads on predetermined together with fixed locations. For posts area, the most mutual places are below the title, at the get-go of the ship service or at the destination of it.

But what if nosotros desire to display an AdSense advertizement inwards the middle of a post?
We tin manipulate the location of the ads to last displayed yesteryear adding a script within the template together with using a tag within our ship service to where nosotros desire the AdSense advertizement to appear. Once added, nosotros tin house the ads anywhere, last it betwixt paragraphs or inwards the middle of the content etc.
Related: Insert AdSense within posts later the maiden of all paragraph
Manually inserting AdSense ads inwards the middle of posts inwards Blogger is pretty easy, but follow these steps below:

Step 2. Replace <data:post.body/> amongst this code:
Note: For centering the ads, add together the <center></center> tags earlier together with later the AdSense code, similar this:
Please depository fiscal establishment notation that if you lot don't add together this annotation to specify where to display the ad, together with thence it volition look below the championship yesteryear default.
So this is how nosotros tin add together AdSense ads inwards the middle or anywhere within our Blogger posts. Don't worry nearly violating the Google's Terms of Service because applying this method volition non modify the ad' structure.

But what if nosotros desire to display an AdSense advertizement inwards the middle of a post?
We tin manipulate the location of the ads to last displayed yesteryear adding a script within the template together with using a tag within our ship service to where nosotros desire the AdSense advertizement to appear. Once added, nosotros tin house the ads anywhere, last it betwixt paragraphs or inwards the middle of the content etc.
Related: Insert AdSense within posts later the maiden of all paragraph
Manually inserting AdSense ads inwards the middle of posts inwards Blogger is pretty easy, but follow these steps below:
Adding Adsense Ads In the Middle or Anywhere within Blogger Posts
Before proceeding, it is recommended to backup your template: become to "Template" together with click on the "Backup/restore" push to salve a re-create on your difficult drive.Adding the script
Step 1. First matter nosotros bespeak to exercise is to parse the AdSense code together with convert it to manifestly text. Then become to "Template", click on the "Edit HTML" push together with click anywhere within the code expanse to search using CTRL + F keys for this tag:<data:post.body/>Note: you lot may detect it several times, but nosotros bespeak to halt at the instant one. Or, if you lot can't run into whatever changes, seek out the 3rd one.

Step 2. Replace <data:post.body/> amongst this code:
<div expr:id='"adsmiddle1" + data:post.id'></div>Step 3. Add the converted Adsense code on where you lot run into the <!-- Add hither the code of your advertizement --> annotation, together with thence salve the changes yesteryear clicking on the "Save template" button.
<b:if cond='data:blog.pageType == "item"'>
<b:if cond='data:blog.pageType != "static_page"'>
<div style="clear:both; margin:10px 0">
<!-- Add hither the code of your advertizement -->
</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>
Note: For centering the ads, add together the <center></center> tags earlier together with later the AdSense code, similar this:
<div style="clear:both; margin:10px 0">
<center>
<!-- Add hither the code of your advertizement -->
</center>
</div>
Adding the AdSense annotation to display the ad
Step 4. When you lot exercise a New Post, add together this annotation within the "HTML" department to where you lot desire the Google AdSense ads to appear:<!-- adsense -->For example:
This is a exhibit text. This is a exhibit text. This is a exhibit text. This is a exhibit text. This is a exhibit text. This is a exhibit text. This is a exhibit text. This is a exhibit text. This is a exhibit text. This is a exhibit text.<br /><br /> <!-- adsense -->This is a exhibit text. This is a exhibit text. This is a exhibit text. This is a exhibit text. This is a exhibit text. This is a exhibit text. This is a exhibit text. This is a exhibit text. This is a exhibit text. This is a exhibit text.
![]() |
| AdSense annotation inwards the middle of the ship service content |
So this is how nosotros tin add together AdSense ads inwards the middle or anywhere within our Blogger posts. Don't worry nearly violating the Google's Terms of Service because applying this method volition non modify the ad' structure.
