For some reason that I personally as a layman don’t get it is there’s some advertisers that want to have their ads banners show only on home page, IMHO as a layman isn’t that better to banners on all over the part of the blogs (like in every page?). But as an publishers we have to provide a good services to our client thus it’s better to make them satisfied. And in this post, I will reveal a trick to make your ad only appears on the homepage only.
Go to your Index.php file and added the following code to the bottom of the page inside the loop:
EDIT: Thanks to Storm for dropping me a comment with an even simpler method which came from Douglas Karr. Here it is:
<?php if(is_home() && $post==$posts[0] && !is_paged()) { ?>
PLACE ADVERTISEMENT HERE.
<?php } ?>
What this does is causes the ads to appear on the Homepage, but not on any of the other Category or Archive “pages”.
What this code will do is making the ads to appear only on the hompege.
Source: Onemansblog.
Related posts: