This is a minimal guide to Add Adsense Ads In the Middle or Anywhere inside blogger post.
we cut off extra text and lines to keep you Step-focused.
- Navigate to Blogger.com > Blog > Template > Edit HTML.
- Now open Search tool by Pressing Ctrl + F & Type and search for
<data:post.body/>
tag code, Note: You may found this code more than 2 times, choose the Correct Tag. its always nearby this similar tag <!-- Then use the post body as the schema.org description, for good G+/FB snippeting. --> - Tip - make your Templates backup before Doing any Edits. so you can revert back in the case.
Now you need to replace the above code with below code.<div expr:id='&quot;aim1&quot; + data:post.id'/>
<div style='float:right;border:1px solid #aaa;background: #f5f5f5 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq8_z2bcm7LoqW1wzvbr6Qab4Pe3zc1dme1KfQbsJe3bskugRRBn6r_PewzAt9LzR_yhLjGw_21NPs0k9eqUxjKyxn2gtULdBMYF1ds2xzWzKHZ2VLcV1XXMGhwOR0KhEIxiR984pymH7R/s0/bg-pattern.png) repeat top left;padding:10px;clear:both; margin:10px 0;border-radius:3px;box-shadow:inset 0 0 3px 2px #ccc'>
Your Converted Adsense Code Here
</div>
<div expr:id='&quot;aim2&quot; + data:post.id'>
<data:post.body/>
</div>
<script type='text/javascript'>var obj0=document.getElementById("aim1<data:post.id/>");var obj1=document.getElementById("aim2<data:post.id/>");var s=obj1.innerHTML;var t=s.substr(0,s.length/2);var r=t.lastIndexOf("");if(r>0){obj0.innerHTML=s.substr(0,r);obj1.innerHTML=s.substr(r+1)}</script>
Now just replace the Blue text line with Ad Converter.
<div style='float:right;border:1px solid #aaa;background: #f5f5f5 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq8_z2bcm7LoqW1wzvbr6Qab4Pe3zc1dme1KfQbsJe3bskugRRBn6r_PewzAt9LzR_yhLjGw_21NPs0k9eqUxjKyxn2gtULdBMYF1ds2xzWzKHZ2VLcV1XXMGhwOR0KhEIxiR984pymH7R/s0/bg-pattern.png) repeat top left;padding:10px;clear:both; margin:10px 0;border-radius:3px;box-shadow:inset 0 0 3px 2px #ccc'>
Your Converted Adsense Code Here
</div>
<div expr:id='&quot;aim2&quot; + data:post.id'>
<data:post.body/>
</div>
<script type='text/javascript'>var obj0=document.getElementById("aim1<data:post.id/>");var obj1=document.getElementById("aim2<data:post.id/>");var s=obj1.innerHTML;var t=s.substr(0,s.length/2);var r=t.lastIndexOf("");if(r>0){obj0.innerHTML=s.substr(0,r);obj1.innerHTML=s.substr(r+1)}</script>
(Parsing AdSense Ad code - it just make code HTML friendly by changing
- this & to
&amp;
- this
'
to&#039;
- this
"
to&quot;
- this
<
to&lt;
- this
>
to&gt;
Now I have styled the widget using few lines of CSS code, so you might wanna change it according to your blog design.
You can change the position of Adsense ad code by changing the value in Red color in above code. [ 0,s.length/2) ]
Tag :
Adsense related,
blogger-guide
0 Komentar untuk "Add adsense Ads Middle of Blogger | Each Post Automatically"