0 How to show Adsense Ads Only on Home page or Post pages of Blogger/ WordPress blog

you can show different ads on homepage and post pages on your Blogger or  WordPress blogs. All you have to do is use the conditional tags with the ad code. You may use a conditional tag to show ads only on homepage and another conditional tag to show ads only on post pages. In this way, you can show different ads on homepage and blog post pages.
When you place ads to your Blogger or WordPress blog they appear on Home page, Post Pages and other pages. Some of you want to show the ads only on Home page or Posts pages.


Loging In your Blogger select Dashboard ---> Design ---> Edit HTML ---> Select Expend Widget Template :

Note : Before doing anything take the backup of your template by click on Download Full Template.




Show ads on Home Page only

Find These ads line in  HTML Code

Change your ad code as follows

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

Show ads on Individual Posts Page only

Change your ad code as follows

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

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

Show ads on Home Page only

Change your ad code as follows

<?php if (is_home()) { ?>
YOUR AD CODE
<?php } ?>
Show ads on Individual Posts Page only

Change your ad code as follows

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

0 comments:

Post a Comment

 

Get Everthing Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates