How to Add Advertisement Between Posts in Wordpress
The advertisement is the best and easiest way for money blogging. Most of us like to put the advertisement in the sidebar and in the post. As we know the more advertisement you show the more earning you get. So we should think about how to increase advertisements friendly and effectively.
The bottom of the first post in your home page is a good position for advertisements. The readers will take note of what is it at the bottom of the first post. If there is a size of 468X60 ads, it will be blended in your blog perfectly.
If you want add the great ads in the home page, you can get start from the index.php file of your wordpress theme. Find the statement of:
<?php while ( have_posts() ) : the_post() ?>
Add this code before that statement, and it should be like this:
<?php $postcount = '1'; ?><?php while ( have_posts() ) : the_post() ?>
And then find the statement of <?php endwhile; ?>, and add the post count code before, when you finish it will look like this:
<?php $postcount ++;endwhile; ?>
Now you can add the advertisement between the while and endwhile function, using same format like the below code, you can change the number to change how many post with advertisements.
<? if($postcount<= 1) { ?> <!-- your ad code --> <?php }?>









