Playing around with WordPress always fun especially this CMS is very easy to customize so to make Ads only show up on Homepage and is hided on single pages. The steps is pretty simple, if you want to make the ads only appears on WordPress homepage you should place a short code to your index.php, here’s the steps:
1. Open your index.php.
2. Put the following code with your Ads code or link anywhere inside your Index.php file:
<?php if(is_home() && $post==$posts[0] && !is_paged()) { ?>
Your Ads code or text link
<?php } ?>
3. Save or update the file.
By that short code you have told WordPress to show the Ads or text link on homepage only and hide them on other pages in your WordPress blog and that’s the simple WordPress Hack.
See you in the next post.
Related posts:





veru useful code tnx for sharing this.and works fine