Displaying Google Adsense in Blogs
Google® Adsense® can be a great tool for making money. Blogs are also becoming a great tool for making money. Many people know that the most profitable position to place Google® Adsense® ads is inline with your article text. The dilemna many of us face is that the Google® Adsense® Terms of Service only allow 3 ad blocks per page. The reason this is a problem for bloggers is that most blogs show more than three posts on the main page or in the archives section of the site. When this is the case you can’t post an article Google® Adsense® in the article.
While setting up my wife and her friend’s new site (www.naturalfamilynews.com), I came up with a trick using JavaScript to fix that problem. The code I wrote works perfectly in WordPress, but you should be able to adapt it to any blog that uses templates.
Step 1. In the head section of the template (between the and tags), you insert the following JavaScript code:
Step 2. Go to the template used to display your post (in WordPress the main template). Then insert the following code inside the display area for the post:
Step 3 Insert your Google® Adsense® code directly following the tag that you inserted in Step 2 above.
Step 4 Insert the following code after the tag from the Google® Adsense® code you inserted in step 3 :
Step 5. Save your changes and test it out.
What this does is create a new DIV section in your code that is hidden if it appears more than three times on the page. So only three ads will appear on any page. If you use Google® Adsense® in other places in your blog, then you will need to adjust the number “temp” in the first step up to display less inline ads. For instance, only two inline ads will appear if you change the code to:
Only one inline ad will appear if you change it to:
September 20th, 2009
टेस्त्
September 20th, 2009
test comments
September 12th, 2010
Buy:Prednisolone.100% Pure Okinawan Coral Calcium.Human Growth Hormone.Nexium.Lumigan.Zyban.Synthroid.Petcam (Metacam) Oral Suspension.Accutane.Arimidex.Valtrex.Zovirax.Prevacid.Actos.Mega Hoodia.Retin-A….
December 18th, 2010
████████►BUY CIALIS◀████████…
▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲…
December 20th, 2010
abilify side effects in children…
Buydrugs without prescription…
December 23rd, 2010
cephalexin dosage for dogs…
Buygeneric drugs…
December 28th, 2010
fosamax@actonel.now” rel=”nofollow”>.…
Buynow…
December 28th, 2010
Advair@official.site” rel=”nofollow”>.…
Buynow it…
December 30th, 2010
allopurinol@and.coumadin” rel=”nofollow”>……
Buygeneric drugs…
December 30th, 2010
Ampicillin@official.site” rel=”nofollow”>.…
Buynow it…
December 30th, 2010
Avelox@official.site” rel=”nofollow”>……
Buyno prescription…
December 31st, 2010
..…
Buygeneric drugs…
December 31st, 2010
ashwagandha@supplement.now” rel=”nofollow”>……
Buygeneric meds…
December 31st, 2010
atarax@and.hives” rel=”nofollow”>.…
Buygeneric drugs…
January 1st, 2011
Augmentin@official.site” rel=”nofollow”>.…
Buywithout prescription…
January 1st, 2011
Clonidine@official.site” rel=”nofollow”>……
Buynow…
January 2nd, 2011
Chantix@official.site” rel=”nofollow”>.…
Buydrugs without prescription…
January 3rd, 2011
Abana@official.site” rel=”nofollow”>.…
Buynow it…
January 21st, 2011
Depakote@official.site” rel=”nofollow”>……
Buyit now…
January 21st, 2011
Depakote@official.site” rel=”nofollow”>.…
Buygeneric drugs…
February 4th, 2011
side effects zyprexa overdose breathing autonomic…
Buyno prescription…
February 5th, 2011
Zocor…
Buygeneric meds…
February 6th, 2011
other names for trazodone…
Buyno prescription…
February 6th, 2011
quinapril…
Buyit now…
February 7th, 2011
dog zyrtec…
Buygeneric drugs…
February 7th, 2011
xopenex coupon…
Buyno prescription…
February 7th, 2011
zyprexa increase eps complaints…
Buyno prescription…
February 7th, 2011
Zocor…
Buygeneric drugs…
February 7th, 2011
Vytorin…
Buynow…
February 7th, 2011
Vitamin B…
Buydrugs without prescription…
March 3rd, 2011
Zyvox…
Buydrugs without prescription…
March 5th, 2011
Rogaine…
Buygeneric meds…
March 6th, 2011
Rogaine…
Buyno prescription…
March 6th, 2011
Retin A…
Buygeneric drugs…
March 7th, 2011
Eye Drops…
Buynow…
March 7th, 2011
Risperdal…
Buygeneric meds…
March 8th, 2011
Seroquel…
Buywithout prescription…
March 9th, 2011
howard county purim carnival 2010…
Buyno prescription…
March 9th, 2011
Synthroid…
Buywithout prescription…
March 9th, 2011
how much benadryl to take with zyrtec…
Buydrugs without prescription…
March 10th, 2011
Zyprexa…
Buyno prescription…
March 10th, 2011
savella cheap canada…
Buyno prescription…
March 11th, 2011
low dose haldol and paxil…
Buygeneric drugs…
March 28th, 2011
Pyridium@Pyridium.Pyridium” rel=”nofollow”>……
Buygeneric meds…
March 29th, 2011
Synthroid@Synthroid.Synthroid” rel=”nofollow”>.…
Buynow it…
March 29th, 2011
Prozac@Prozac.Prozac” rel=”nofollow”>……
Buynow…
March 29th, 2011
Tri@Cyclen.now” rel=”nofollow”>……
Buyno prescription…
March 29th, 2011
Pulmicort@Pulmicort.Pulmicort” rel=”nofollow”>..…
Buyit now…
March 29th, 2011
Soma@Soma.Soma” rel=”nofollow”>.…
Buyno prescription…
March 30th, 2011
Sleep@Tea.now” rel=”nofollow”>..…
Buyno prescription…
March 30th, 2011
Prozac@Prozac.Prozac” rel=”nofollow”>……
Buygeneric drugs…
March 30th, 2011
Purim@Purim.Purim” rel=”nofollow”>……
Buygeneric drugs…
March 30th, 2011
Strattera@Strattera.Strattera” rel=”nofollow”>……
Buynow it…
March 31st, 2011
Singulair@Singulair.Singulair” rel=”nofollow”>……
Buygeneric pills…
March 31st, 2011
Prozac@Prozac.Prozac” rel=”nofollow”>.…
Buygeneric pills…
March 31st, 2011
Cialis@Cialis.Cialis” rel=”nofollow”>..…
Buyno prescription…
April 2nd, 2011
……
Buywithout prescription…
April 2nd, 2011
allegra@print.colorado.springs” rel=”nofollow”>……
Buygeneric drugs…
April 4th, 2011
.…
Buyno prescription…
April 4th, 2011
.…
Buywithout prescription…
April 4th, 2011
alternatives@to.premarin” rel=”nofollow”>……
Buygeneric pills…
April 5th, 2011
altace@generic.name” rel=”nofollow”>.…
Buynow it…
April 6th, 2011
……
Buygeneric drugs…
April 7th, 2011
wholesale@ginseng.root” rel=”nofollow”>……
Buyno prescription…