Breaking News:

latest

How to Add AdSense Ads in the Middle Or Anywhere Inside Blogger Posts

Hello and Welcome to GetWebInfo. Here on this Post i will tell you that how can you Add AdSense Ads in The Middle or Anywhere inside Blogger...

Hello and Welcome to GetWebInfo. Here on this Post i will tell you that how can you Add AdSense Ads in The Middle or Anywhere inside Blogger Posts. We can manipulate the location of the ads to be displayed by adding a script inside the template and using a tag inside our post to where we want the AdSense Ad to appear. Once added we can place the ads anywhere, be it between paragraphs or in the middle of the content etc.

Manually inserting AdSense Ads in the middle of posts in Blogger is pretty easy and simple steps, Just follow these steps below.




Adding AdSense Ads in the Middle or Anywhere Inside Blogger Posts


Before preceding 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.



Adding The Script

Step 01. First thing we need to do is Parse the AdSense Code and convert it ti plain text. Then go to "Template" Click on the "Edit HTML" button and click anywhere inside the code area to search using CTRL+F keys this tag"

<data:post.body/>
Note: You May find it several times, but we need to stop at the second one. Or If you can't see any changes test the third one.


Step 02: Replace <data:post.body/> with this code:

<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>
Step 03: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

Step 04:  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 demo from GetWebInfo.This is demo from GetWebInfo.This is demo from GetWebInfo.This is demo from GetWebInfo.This is demo from GetWebInfo.This is demo from GetWebInfo.This is demo from GetWebInfo.This is demo from GetWebInfo.This is demo from GetWebInfo.This is demo from GetWebInfo. <!-- adsense --> This is demo from GetWebInfo.This is demo from GetWebInfo.This is demo from GetWebInfo.This is demo from GetWebInfo.This is demo from GetWebInfo.This is demo from GetWebInfo.This is demo from GetWebInfo.


Example in Picture





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. After doing all this precess open you'r website in new window and make sure everything working properly. I hope this article is really help full for you if you like this article so please share it to social media thanks.......

No comments