Created
June 24, 2013 18:19
-
-
Save vinayprajapati/5852227 to your computer and use it in GitHub Desktop.
Ads in mid of Blogger posts manual placement. Just paste <!-- ads --> anywhere in Blogger post and ad will appear there.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Ads in mid of post: Manual Placement --> | |
<b:if cond='data:blog.pageType == "item"'> | |
<div expr:id='"atmid" + data:post.id'/> | |
<b:loop values='data:post.labels' var='label'> | |
<b:if cond='data:label.name == "Label-Name"'> | |
<div style="clear:both; margin:10px 0;text-align:center"> | |
<!-- Paste Ad code here: Appear at mid of the post --> | |
</div> | |
</b:if> | |
</b:loop> | |
<div expr:id='"attop" + data:post.id'> | |
<b:loop values='data:post.labels' var='label'> | |
<b:if cond='data:label.name == "Label-Name"'> | |
<div style="clear:both; margin:10px 0;text-align:center"> | |
<!-- Paste Ad code here: Appear at top of the post --> | |
</div> | |
</b:if> | |
</b:loop> | |
<data:post.body/> | |
<b:loop values='data:post.labels' var='label'> | |
<b:if cond='data:label.name == "Label-Name"'> | |
<div style="clear:both; margin:10px 0;text-align:center"> | |
<!-- Paste Ad code here: Appear at bottom of the post --> | |
</div> | |
</b:if> | |
</b:loop> | |
</div> | |
</b:if> | |
<script type="text/javascript"> | |
var obj0=document.getElementById("atmid<data:post.id/>"); | |
var obj1=document.getElementById("attop<data:post.id/>"); | |
var s=obj1.innerHTML; | |
var r=s.search(/\x3C!-- ads --\x3E/igm); | |
if(r>0) {obj0.innerHTML=s.substr(0,r);obj1.innerHTML=s.substr(r+13);} | |
</script> | |
<!-- Ads in mid of post: Manual Placement --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice