Monday, 9 December 2013

How To Remove Label Number Count In Blogger

By default, the Labels Widget that can
be added into your Blog through
Template -> Page Element -> Add a
Page Element will have an automatic
count of the number of posts bearing
that label tag.
If you don't like to see the count, or you
want to change the brackets to square
brackets or something else, you can
edit the template code. Before any
change, remember to back up your
template. Go to Template -> Edit HTML
and save a copy of your existing
template by clicking the "Download Full
Template" link. Next, check the
"Expand Widgets Template" box.
We assume you already have a Labels
widget in your Blog. Our task is to
locate this widget in the template. If
your Labels widget has a title, it is
easy. Simply search (using Ctrl-F in
most browsers) for the title. Every label
widget is assigned an ID such as
id='Label1' or id='Label2' and so on. If
you don't have a title for your Labels
widget, search for these IDs. Another
method which we strongly recommend
is for you to enter a temporary title into
that Labels widget and search for that
title. You can always remove the title
after you have amended the template.
The part of the template that defines
your Labels widget will look like this:-
<b:widget id='Label1'
locked='false' title=''
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'>
<data:label.name/>
<b:else/>
<a
expr:href='data:label.url'><data:label
.name/></a>
</b:if>
(<data:label.count/>)
</li>
</b:loop>
</ul>
If you don't want the number count to
appear after the Labels, delete the
portion in red.
Should you want a square bracket,
change the portion in red to:-
[<data:label.count/>]
If you want a hyphen followed by the
number, change the red line to:-
-<data:label.count/>
Preview the Template. If this is what
you want, save the Template and
refresh the Blog page.
© trick-to-bolg comment ans share

0 comments:

Post a Comment

Your Comment Here Is Important To Add Your Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Facebook Themes