But what if we want to display an AdSense ad in the middle of a post?
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 simple, just follow these steps below:
Before proceeding, it is recommended do backup your template (go to Template > click on the Backup/restore button)
Step 1. First thing we need to do is to "parse" the AdSense code, in other words, convert it to plain text. Then go to Template, click on the Edit HTML button, click anywhere inside the code area and look for this tag (CTRL + F):
<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
Screenshot |
<div expr:id='"adsmiddle1" + data:post.id'></div>Step 3. Put the converted Adsense code to where you see the <!-- Add here the code of your ad --> annotation, then save the changes by 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 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>
Note: For centering ads, add the center tag before and after the AdSense code, like this:
<div style="clear:both; margin:10px 0">Step 4. When you create a New Post, add this tag inside the HTML section to where you want the Google AdSense ads to appear:
<center>
<!-- Add here the code of your ad -->
</center>
</div>
<!-- adsense -->For example:
<div>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.</div>
<!-- adsense --><div>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.</div>
Screenshot |
And you don't have to worry about violating the Google's Terms of Service because applying this method we are not changing the structure of the ad.
hair removal washington dc Online casino Mortgage Hosting Health Business · World Trade Center Footage Loans Technology Mesothelioma Law Firm Donate Car for Tax Credit Insurance mesothelioma claim Blogging Making Money online Lawyer Forex Trading CRIMINAL DEFENSE ATTORNEY PALM BEACH ANNUITY SETTLEMENT Car insurance quotes Colorado Web Hosting and Domains Transfer domains yahoo Classes Credit Software Recovery mesothelioma survival rates structured settlement buyer benchmark lending Dreamhost Donate Laws and lawyers Business Conference Call Geographical Location of the Visitors Trading ACCIDENT AND INJURY ATTORNEY DAYTON FREIGHT LINES Donate your car Sacramento Claim iPage Rehab Treatment Cord Blood Online Colleges Degree Attormey SELLING A STRUCTURED SETTLEMENT ANNUITY Gas/Electricity Attomey Donate Car to Charity California STRUCTURED ANNUITY SETTLEMENT NUNAVUT CULTURE Donate car to charity California structured settlement annuity companies mesothelioma attorneys california Technology Blogs structured settlements annuities MOTORCYCLE ACCIDENT ATTORNEY LOS ANGLES mesothelioma suit Auto insurance affiliate program Blogs Based On Donations
0 comentarios:
Publicar un comentario