First of all let’s get one thing clear: Most bloggers and blog readers expect to find a categories list on a blog and most blog platforms do provide category lists if needed. Although most blogs do show categories the other two terms in common use are tags and labels.

Technorati and many other sites use tags. Blogger uses labels, but it doesn’t matter what they call them as they all perform the same function. They help you to find posts on the subject in which you are interested.

Labels Gadget If you use a third party template on your blog it will almost certainly come with a categories gadget in place. Blogger’s own templates usually do not have it as standard but it can be added easily by using Add a Gadget on the Layout>Page Elements tab of your Dashboard.

Once you have selected the Labels gadget you can change its name to Categories, Tags or anything else which will not completely confuse your readers.

Both gadgets come with a count in brackets as standard. There are two things you can do to customise the count:

  1. Remove the brackets if you prefer this.
  2. Remove the count completely.

What you do, if anything, is all a matter of personal taste. You may prefer the count without the brackets or you may, like me, think the count makes the template look untidy and decide to remove it. Another reason for removing it, especially from the labels/categories, is that you have a lot of categories with only one entry and you prefer to hide that meagre count.

The low count problem will obviously happen with fairly new blogs. If after a while you have built up a good post count you can always put the count back in by typing back the code you have removed. Better still, just copy the  two sections of code you will be altering and save them in a clearly labelled text file. Then you can simply copy and paste them back into the template if you change your mind.

First of all, for safety’s sake download the template before you make any changes and then expand the widgets by ticking Expand Widget Templates.

The code you have to remove is different for the labels and archive widgets so I will deal with Labels first.

Labels/Categories/Tags

The code you need to remove, or just alter to remove the brackets, is:

(<data:label.count/>)

The easiest way to find the labels code is to use your browser’s find or search function and enter the following:

b:widget id='Label

This should take you to the following widget code:

<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/>
          </a>
        </b:if>
        <span dir='ltr'>(<data:label.count/>)</span>
      </li>
    </b:loop>
    </ul>

    <b:include name='quickedit'/>
  </div>
</b:includable>
</b:widget>

Deleting the highlighted code will completely remove the count. If you want to leave the count but remove the brackets then you simply need to delete the two round brackets ( and ).

That is the simple method which will apply to almost all templates. I have however come across a few templates which have the following code for the labels widget:

<b:widget id='Label12' locked='false' title='Categories' 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/> (<data:label.count/>)
            <b:else/>
              <a expr:href='data:label.url'><data:label.name/> (<data:label.count/>)</a>
            </b:if>

          </li>
        </b:loop>
        </ul>

      </div>
</b:includable>
</b:widget>

Here you have two instances of the count to delete. Just make sure that you check that you have not accidentally left one of them behind. And please remember that you may find variations on this depending on who designed the template.

Blog Archive

(Also of interest: Moving the Blog Archive Count in Third Party Templates)

The code you need to remove, or alter if you just want to remove the brackets, is:

(<data:i.post-count/>)

To locate the blog archive widget use the browser’s find/search to locate the following:

<b:widget id='BlogArchive

This should lead you to this code. It is a long section of code so I have shortened it to save you having to scroll right down the page.

<b:widget id='BlogArchive2' locked='false' title='Blog Archive' type='BlogArchive'>
………………………………………………………………………………… 
        <li expr:class='&quot;archivedate &quot; + data:i.expclass'>
          <b:include data='i' name='toggle'/>
          <a class='post-count-link' expr:href='data:i.url'><data:i.name/></a>
            <span class='post-count' dir='ltr'>(<data:i.post-count/>)</span>
          <b:if cond='data:i.data'>
            <b:include data='i.data' name='interval'/>
          </b:if>
          <b:if cond='data:i.posts'>
            <b:include data='i.posts' name='posts'/>
          </b:if>
        </li>
      </ul>
  </b:loop>
</b:includable>
<b:includable id='menu' var='data'>
  <select expr:id='data:widget.instanceId + &quot;_ArchiveMenu&quot;'>
    <option value=''><data:title/></option>
    <b:loop values='data:data' var='i'>
      <option expr:value='data:i.url'><data:i.name/> (<data:i.post-count/>)</option>
    </b:loop>
  </select>
</b:includable>
<b:includable id='flat' var='data'>
  <ul>
    <b:loop values='data:data' var='i'>
      <li class='archivedate'>
        <a expr:href='data:i.url'><data:i.name/></a> (<data:i.post-count/>)
      </li>
    </b:loop>
  </ul>
</b:includable>
……………………………………………………………………………………
</b:widget>

In this case you will notice that there are three instances of the  code to remove or alter.

I hope that this will have been useful to you.

Technorati Tags: ,,,

Subscribe to comments for this post (RSS)  

Bookmark and Share

2 comments

Post a Comment

Top of Page

Delivered by FeedBurner


Search Amazon UK

Search Amazon USA


Recent Posts

Recent Comments


Popular Posts