Saturday 15 October 2011

Display blogger gadget only in home page or post pages - Tutorial
Blogger is one of the popular blogging platforms. Its better if you can display certain gadgets or ads unites in certain pages. For example display AdSense ad unite only in post pages and hide in home page.

You can apply this trick to your blog by using conditional "if" command to your template. After that selected widget or ad unite only display in selected page. So you can give more attractions.

Display only in Home page (main page)

<b:if cond='data:blog.url == data:blog.homepageUrl'>

Display only in articles / post pages and hide home page.

<b:if cond='data:blog.pageType == "item"'>

Display only a specific page.

<b:if cond='data:blog.url == "Your URL past in here"'>

How to apply above mention codes to blogger templates.

First you have to select which, code where to apply in your template (blog). Than copy above mention code and past it before your gadget or ad unite then type </b:if> end of it.


Hide Adsense unite in home page.

<b:if cond='data:blog.pageType == "item"'>

Your Adsense code past here


You can watch  simple video how to place above codes in blogger templates