How to Install Google Adsense in the middle Blogspot Posts

Google Adsense How to Install Google Adsense in the middle Blogspot PostsInstalling Google Adsense code in the middle post is not like placed another code statistic in the blogspot page. The easiest way is we have to copy and paste the code every we will publish new posting. but this will make you tired, and also will spend a lot of time. More over, the number of posts that have been published are very lot. But there are other solutions that can be done.

How to Installing Google Adsense in the middle Blogspot Posts

Stage 1

1. Login into Blogger Dashboard -> Layout -> Edit HTML -> Expand Widget Templates.

2. Then search tags <data:post.body/> (if you use auto readmore with summaries, then you should put it on the second code), then exchange the code with the code below:

<div expr:id='"ads1" + data:post.id'></div>
<div style="clear:both; margin:10px 0">

<!-- AdSense code -->

</div>
<div expr:id='"ads2" + data:post.id'>

<data:post.body/>

</div>
<script type="text/javascript">
var obj0=document.getElementById("ads1<data:post.id/>");
var obj1=document.getElementById("ads2<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>

3. Save your Template.

Stage 2

1. first change the google adsense code into the writing of a symbol in html. (using html parser.)  you can visit this site: http://www.blogcrowds.com/resources/parse_html.php

2. Then, Put your google adsense code section

3. Save your Template.

And see the results. Good luck.

Popular Incoming search terms:

google, google images, google adsense, google adsense innerhtml, google statistic

No related posts.

1 Comment

  1. Thanks it work. Can we change where exactly it is place? Thanks again

Leave a Reply