GoogleŽ AdsenseŽ can be a great tool for making money. Blogs are also becoming a great tool for making money. Many people know that
most profitable position to place GoogleŽ AdsenseŽ ads is inline with your article text. The dilemna many of us face is that
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
main page or in
archives section of
site. When this is
case you can't post an article GoogleŽ AdsenseŽ in
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
head section of
template (between
<head> and </head> tags), you insert
following JavaScript code:
<script> var temp=0; </script>
Step 2. Go to
template used to display your post (in WordPress
main template). Then insert
following code inside
display area for
post:
<script> if (temp>2) document.write("<div style='visibility:hidden;height=1px;font-size:0;display:none'>"); </script>