Google limits us to display 3 ad units and 1 link unit on any given page. In Wordpress, if we would like to add adsense on the homepage, we would be limited to header, sidebar and the footer. If we add ads at the end of an article, the loop repeats the ad at least 10 times. You don’t want that to happen, isn’t it? Ideally, it would be perfect to add an ad right after the first post which could pose an unprecedented challenge. Here is a small snippet which could do the trick for you without much sweat.
1. Open your FTP application and browse to the theme files. Locate either index.php or home.php depending on the theme and open them.
2. Find this code in the file : <?php endwhile; ?> or one of its variants such as <?php endwhile; else: ?>.
3. Just before the endwhile code, insert this code:
<?php if(!$show_ads){ ?>
YOUR ADSENSE/AD GOES HERE
<?php $show_ads = 1; } ?>
4. Save the file and upload.
5. That’s it!
Piece of cake isn’t it. If you have any further clarifications, let me know…






