Liked

Pin It

Show and Hide Widgets/Gadgets in Home/post/static/archive pages in Blogger


Once you activate any widget, in your blog, it will be displayed in all the pages by default, including your homepage.But what if you want a certain widget to appear only on a certain page or pages, can it be done? Yes You can do this easily using conditional tags.

first go to Blogger’s Dashboard > Design > Page Elements tab and add a “HTML/JavaScript” gadget. I prefer it because it will be easy for everyone to understand. Give it a unique title so that it does not match with any of the titles of other widgets added.
Go to Dashboard > Design > Edit HTML. Check the Expand Widget Templates check box on top right of the HTML window. Find your widget in the HTML by using Ctrl+F and entering the widget Id in the search box. Let’s say I have given the title for my widget as “Recent Comments”. After searching you will find the below snippets:



<b:widget id='HTML1' locked='false' title='Recent Comments' type='HTML'><b:includable id='main'><!-- only display title if it's non-empty --><b:if cond='data:title != ""'><h2 class='title'><data:title/></h2></b:if><div class='widget-content'><data:content/></div><b:include name='quickedit'/></b:includable>
</b:widget>
It's the widget/gadget that you have added from Page Elements tab. All is left is to add conditional tags just below and above to hide the widget form specific pages or posts in Blogger. Let us see some examples:
To Show The Widget Only In HomePage


<b:widget id='HTML1' locked='false' title='Recent Comments' type='HTML'><b:includable id='main'><b:if cond='data:blog.url == data:blog.homepageUrl'><!-- only display title if it's non-empty --><b:if cond='data:title != ""'><h2 class='title'><data:title/></h2></b:if><div class='widget-content'><data:content/></div><b:include name='quickedit'/></b:if></b:includable></b:widget>
To Show Blogger Widget In Post Pages Only

<b:widget id='HTML1' locked='false' title='Recent Comments' type='HTML'><b:includable id='main'><b:if cond='data:blog.pageType == "item"'><!-- only display title if it's non-empty --><b:if cond='data:title != ""'><h2 class='title'><data:title/></h2></b:if><div class='widget-content'><data:content/></div><b:include name='quickedit'/></b:if></b:includable></b:widget>

To Show The Widget In Any Particular Page

<b:widget id='HTML1' locked='false' title='Recent Comments' type='HTML'><b:includable id='main'><b:if cond='data:blog.url == "URL of the page"'><!-- only display title if it's non-empty --><b:if cond='data:title != ""'><h2 class='title'><data:title/></h2></b:if><div class='widget-content'><data:content/></div><b:include name='quickedit'/></b:if></b:includable></b:widget>

To Hide A Widget Only In A Particular Page

<b:widget id='HTML1' locked='false' title='Recent Comments' type='HTML'><b:includable id='main'><b:if cond='data:blog.url != "URL of the page"'><!-- only display title if it's non-empty --><b:if cond='data:title != ""'><h2 class='title'><data:title/></h2></b:if><div class='widget-content'><data:content/></div><b:include name='quickedit'/></b:if></b:includable></b:widget>
To Show Widgets Only In Archive Pages

<b:widget id='HTML1' locked='false' title='Recent Comments' type='HTML'><b:includable id='main'><b:if cond='data:blog.pageType == "archive"'><!-- only display title if it's non-empty --><b:if cond='data:title != ""'><h2 class='title'><data:title/></h2></b:if><div class='widget-content'><data:content/></div><b:include name='quickedit'/></b:if></b:includable></b:widget>

To Show Widgets Only In Static Pages

<b:widget id='HTML1' locked='false' title='Recent Comments' type='HTML'><b:includable id='main'><b:if cond='data:blog.pageType == "static_page"'><!-- only display title if it's non-empty --><b:if cond='data:title != ""'><h2 class='title'><data:title/></h2></b:if><div class='widget-content'><data:content/></div><b:include name='quickedit'/></b:if></b:includable></b:widget>

To Hide Widgets In Static Pages

<b:widget id='HTML1' locked='false' title='Recent Comments' type='HTML'><b:includable id='main'><b:if cond='data:blog.pageType != "static_page"'><!-- only display title if it's non-empty --><b:if cond='data:title != ""'><h2 class='title'><data:title/></h2></b:if><div class='widget-content'><data:content/></div><b:include name='quickedit'/></b:if></b:includable></b:widget>
I Think that this information will help you to customize your blog !

If You Found Something Useful, Then Kindly share This Now:
Technorati Digg This Stumble Stumble Facebook Twitter
साँझा करें Share It Now !
StumpleUpon DiggIt! Del.icio.us Blinklist Yahoo Furl Technorati Simpy Spurl Reddit Google Twitter FaceBook

1 comments:

  1. Rolex wristwatches are frequently no less than one which will anyone thinks hopes to get. Though replica watches that all people are not capable to own cash to the object nearly as bad as it can be pricey selling price, there are rolex replica uk some other type of affordable alternatives using which you might get equivalent style, structure, fashion replica watches sale alleviate which you may get if you last but not least accomplish bogus Rolex wristwatches. Many of us consider the key reason why right this moment anyone just need to suggest her or his style replica watches sale on the wide open or perhaps assert after while while you're watching people anyway. Though every now and then your financial situation do not ever recommends you'll be able to put money into virtually any pricey or rolex replica sale company product. Though you now just lately get do not need worry since when you have bogus wristwatches linked with replica watches sale you may surely shine after while looking at your family members as well as folks.

    ReplyDelete

Your Suggestions are valuable for me.

FeedBurner Updates

 

Thanks for Your Arrival !

Followers

Your Precious Arrival

© 2011-2013. Mast Blog Tips All Rights Reserved Arvind Jangid, Sikar, Rajasthan. Template by Mast Blog Tips | Back To Top |