You can control ad placements of your wordpress blog by different ways. One of them is showing Ads only on the home page. This can be done in two ways. One by the use of a code and other by using a simple plug-in. By using this you can show or display ads only on the homepage and block ads in the internal pages.
The first method is by using PHP code. This code lets you show ads or any content only on the homepage. All you have to do is add in your advertisement code in the following way update your theme to notice the changes.
<?php if ( is_home() ) { ?>
Code you want to show on your homepage
<?php } ?>
The second method involves a wordpress plug-in. It is called as Whydowork Adsense. After you download and install the plug-in, you will be presented with lot of options. Select the ad code and make it to show only on home page and you are done.
In these ways, you can show ads only on the homepage easily. You can use these codes not just for the advertisements but also for any Java script or other code. The purpose of this tip is to show any element only on the homepage of your wordpress blog.


Thanks..
that worked like a charm
this is very useful code and works nice tnx dude.also why do work adsense is nice one
Hi Prasanth,
Thanks for this helpful shortcode!
I have another question (or two) if that’s ok. See, I’m creating a site using WP and I’m using “Pages” for the content pages so, whatever Adsense plugin I use I can’t seem to find out how to NOT have Adsense on certain pages like “About Us”, “Contact Us” etc. I only want Adsense on CERTAIN pages, not all of them.
I don’t know PHP but I think I can manage to use your little bit of code to show Ads on the homepage, but what about other pages of content? Is there a simple solution?
For example, is there a bit of code (maybe an if statement?) where I can add this code to my Page.php page but use &exclude= to exclude a certain number of IDs such as About, Contact, etc.?
Thanks
Scott
@Scott..
Yes, There is a plugin called Why Do Work Adsense which will let you customize the adsense code placement. Try it.