Wednesday, February 23, 2011

Show Adsense Ads/WordPress blog and other Ads Only on Home page or Post pages of Blogger

 You can find the similar post related to it. But here is the simpler procedure you will like. you want to show the ads only on Home page or Posts pages of blogger and wordpress.

Show Adsense Only on Home page or Post pages of Blogger blog

Show ads on Home Page only

your ad code as below:

<b:if cond='data:blog.pageType != &quot;item&quot;'> YOUR AD CODE </b:if>

Show ads on Individual Posts Page only

put your ads code between the red code :

<b:if cond='data:blog.pageType == &quot;item&quot;'> YOUR AD CODE </b:if>

Show Adsense Ads Only on Home page or Post pages of WordPress blog

Show ads on Home Page only

put your ads code between the red code :

<?php if (is_home()) { ?>
YOUR AD CODE
<?php } ?> 


Show ads on Individual Posts Page only

put your ads code between the red code :

<?php if (is_single()) { ?>
YOUR AD CODE
<?php } ?>