Hello and Welcome

This website is not like all of the others. Since 2001, we've posted 15420 different business opportunities and ideas, so you're sure to find something here to inspire you!

To subscribe, enter your email address below:

How to Make Money on Twitter with Ad.ly

Ad.ly, is a brand new Twitter advertising network that can make you money, even if you don’t have thousands of followers.

Read more...

Business Opportunities Weblog’s 8th Birthday

Dane Carlson and the Business Opportunities Weblog celebrates eight years of blogging about quality opportunities and business ideas.

Read more...

How to Show Recent Comments After the First Post

Recent Comments

A reader wrote:

Dane, how do you place advertisements (or other content) after the first (and subsequent) posts on your blog?

Something I’ve done with my blogs for a long time is to place a variety of different content after different posts on the front page. For instance, on all of the Business Opportunities Weblog blogs I’m showing a list of recent comments immediately after the first post on the home page. This is very easy to accomplish with only a simple change to your Wordpress templates.

In your index.php template, inside the loop, below your post tags and above the “endwhile” add this:


$adcounter = $adcounter+ 1;
if ($adcounter == 1) { }
if ($adcounter == 5) { }

To put something in the space immediately below the first post, where I put my recent comment list, put it in the brackets after $adcounter == 1. To put something after the fifth post, put it inside the brackets after $adcounter == 5.

Here’s my code:

Recent Comments code inside The Loop

With this technique, it is possible to put ads or other unique content after every single one of your blog posts.

Have fun.

Related Posts

Comments

  • An excellent idea! Thanks for this. Never thought of spacing item like this. Very simple!
    Lucky wordpress if flexible to enable this kind of tinkering.

    Best regards

    Peter

    Peter

Leave a Reply

Additional comments powered by BackType

« Previous Post

Next Post »