Show Adsense Ads Only on Homepage or Post pages on Blogger and Wordpress
Having same ad format all over your blogs might lead to a lower CTR since your visitors will get familiar with your regular ad formats and locations. It’s a wise idea to show different ad formats on different pages. Yes, you can show different ads on homepage and post pages on your Blogger or self hosted 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.
On Solidblogger, you can see banner sized ads (468*60) on the homepage while individual post pages will show square size ads (336*280 and 300*250). If you want to show different ads on your blog also, you can do this easily by adding a conditional tag.

Show Adsense ads on homepage or individual blog posts on Blogger
To show ads on homepage only, modify your code like this :
<b:if cond='data:blog.pageType != "item"'> YOUR ADVERTISEMENT CODE </b:if>
To show ads on individual blog posts only, modify your code like this :
<b:if cond='data:blog.pageType == "item"'> YOUR ADVERTISEMENT CODE </b:if>
Show Adssense Ads on Homepage or individual posts only on Wordpress blogs
To show ads only on Wordpress homepage, modify your code like the following example :
<?php if (is_home()) { ?>
YOUR ADVERTISEMENT CODE
<?php } ?>
To show ads only on individual blog posts only, modify code like this :
<?php if (is_single()) { ?>
YOUR ADVERTISEMENT CODE
<?php } ?>
Replace YOUR ADVERTISEMENT CODE with your actual Google Adsense ad code. If you want to show the same ads everywhere, simply remove the above conditional tags and keep the advertisement code only.
|
Important Recommendation: Run a Free Scan for Windows Errors Installing or uninstalling software can leave your registry fragmented with corrupted or harmful files. Check your registry with RegistryBooster |
Related Posts
- How to Show Ads on Wordpress Homepage Only
- Read More Plugin to show Post Summary with Thumbnails Automatically on Blogger Homepage
- Show Adsense Ads inside Blogger Posts, Wrapped with Post Text
- Show Post & Comments Count in Blogger / Blogspot Blogs
- Show Animated Image Icon Before Post Titles in Blogger / Blogspot



















They are useful for blogger newbies indeed because in Wordpress, task can accomplished using various Plugins.
this tutorial is very useful for me, thanks…
this is a gr8 tip, took long time to find this here. Thx for sharing..
thanks but i want to apply it blogger it is not working for me any way thanks
not working for blogger, it say Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The element type “head” must be terminated by the matching end-tag “”.