How To Show Blogger widget/Item only in home page or Item Page

How To Show Blogger widget/Item only in home page or Item Page | Blogging In Web 2.0 Beta
When We Install a Widget on our blog templates its usually displayed on all the pages of the blog. For Examples Watch Out On the Right side of my Blog. You will see many widgets installed here like Popular Post,Recent Post,Most Viewed and many others. As the default setting these are shown on all pages as same on home page & same on post page. But If I want to show Some one only of home page Or Other on only Item page Or we can say only on a specified Blog post. Then I have to Make Some Addiction on the Codes for the all widgets I am Going to Show/Hide.

So lets Start one By one. First We Take The Home page. I want to Display Something Only On My Front home Page Then I Will Wrap the Widget in the Below Code:-

<b:if cond='data:blog.url == data:blog.homepageUrl'>
The Widget Code Comes Here.

Now I Want to Show Some Widgets Only On Post/Item pages Then I Will Add the Below Code

<b:if cond='data:blog.pageType == "item"'>
The Widget Code Comes Here.

Or you can display a Blogger widget only in a particular post page by changing it with following code .

<b:if cond='data:blog.url == "blog post URL"'>
The Widget Code Comes Here.

So Now We can Change The Displaying Patten of our widgets in out Blog.

Related Posts by Categories

If Your Enjoyed this Article

Then you May Also Interested In Receiving Updated By Mail:

Enter your email address:-


Anok Imchen said...

useful one...i'm gonna use the laster code to display one in a poarticular page...

Joseph Vizcarra said...

I think the closing tag should be < / b : i f >

Gurpreet Singh said...

@Joseph Vizcarra Thanks for Telling about mistake

Sean Copeland said...

That was exactly what I was looking for! I've been trying to figure out how to do this to my blog for the longest time. Thanks again for your help!

Nalaka Prasad said...

wow, realy amazing tute, thanks very very much

Post a Comment