greensboro news
General | Local / Regional | Food | Entertainment | Technology | Religion | Politics | Sports | Travel | How To | Classifieds | Beth's Blog
Greensboro Weather
::

How to add AdSense in Blogger Posts

By beth
Executive Editor
Published: Thu Aug 03, 2006 7:35 pm

One of the biggest problems with Bloggers, is there inability to correctly place ads to return good revenue. If you've been wanting to place ads in your posts so that your articles wrap around the ad, but didn't know how, here's your chance.

Here's an example of how to set Blogger or Blogspot blogs up where AdSense (or another advertising network) in the middle of your blog posts.

Find in your blogger template:

Code:
<BlogItemBody>


Replace with:

Code:
<div></div>

<div>

<div>
<Your>
</div>
</div>

<div>

<BlogItemBody>
</div>

<script>
var obj0=document.getElementById("prv<BlogItemNumber>");
var obj1=document.getElementById("fst<BlogItemNumber>");
var s=obj1.innerHTML;
var r=s.search(/<adsense>/igm);
if(r>0) {obj0.innerHTML=s.substr(0,r);obj1.innerHTML=s.substr(r+9);}
</script>


(Of course replace the area marked with your own AdSense code. I recommend the 250x250 ad type.)

Save your template, and click on Settings in Blogger. Then click on Formatting. Now scroll down to where it says: Post Template. Enter the following code:

Code:
<adsense></adsense>


Right above the Post Template there is a box named: Enable Float Alignment. Change this to NO.

Save Settings, republish, and forget.
Display posts from previous:   
Reply to topic All times are GMT - 4 Hours
Page 1 of 1


Discussion & © 2005-2006





Advertise here

Sexy Shannon | Free Dish Network