Nitesh is back to blogging.. Apologies for no updates since last 2 months..
TopBottom

How to remove label post count from label widget

Posted by Nitesh Kothari on 06 October 2008
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit


Label widget is one of the most used widget by readers or blog visitors. By default, Label Widget displays number of posts under a particular label. Many times, we have only one or two posts under a label, which may create a bad impression on your readers. Some of my blogger friends were asking me "how to remove label post count from label widget." So, i decided to write about it. This is probably the easiest blogger hack among other hacks.

How to remove label post count from label widget
Go to Layout->Edit Template HTML->check the expand widget template. Now search box to the Label Widget code or b:widget id='Label. The code looks like this:

<b:widget id='Label1' locked='false' title='Labels' type='Label'>
<b:includable id='main'>
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content'>
<ul>
<b:loop values='data:labels' var='label'>
<li>
<b:if cond='data:blog.url == data:label.url'>
<span expr:dir='data:blog.languageDirection'>
<data:label.name/>
</span>
<b:else/>
<a expr:dir='data:blog.languageDirection' expr:href='data:label.url'>
<data:label.name/>(<data:label.count/>)
</a>
</b:if>
<span dir='ltr'/>
</li>
</b:loop>
</ul>
<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>

(<data:label.count/>) tag is used to show post count of a label. Just remove this code if you do not wish to show label post count.

If you still can't get it, leave a message here with your problem. Did you like this hack?

Labels:

Post a Comment

Thank you for commenting at NiteshKothari.com. I follow "U comment I comment" movement. All the comment are dofollow. Please do not spam or leave meaningless or short comments. I expect you to leave me meaningful, relative and genuine comments. Thank you.