How to Remove the Label Post Count - Harder Method

There is a very easy way to stop the post count from displaying after each label on the Sidebar.


Before modifying HTML, read our blog How to Remove the Number of Posts Displayed by Each Label (Easy) for a super easy way of doing it that you might not remember.

However, if that method doesn't work for you, follow the instructions below.

Get into your blog and click Customize, click the Layout tab, and click Edit HTML. Click Download Full Template to save a fresh backup of your template. Then check the "Expand Widgets Template" box.

To quickly locate the code below, press Ctrl+F to open up the "find" box, copy and paste "data:label.count inside the box, and click Next.

If you find the code below, delete the line highlighted in red. If you do not find the code below, continue reading below.

<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, instead, you find the code listed below, delete the two lines highlighted in red. If you don't like to delete lines of widget code, you can comment them out by preceding the line with <!-- and ending the line with -->

<a expr:dir='data:blog.languageDirection' expr:href='data:label.url'><data:label.name/></a>
</b:if>
<b:if cond='data:showFreqNumbers'>
<span dir='ltr'>(<data:label.count/>)</span>
</b:if>
</li>
</b:loop>
</ul>
<b:else/>
<b:loop values='data:labels' var='label'>
<span expr:class='"label-size-" + data:label.cssSize'>
<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>
<b:if cond='data:showFreqNumbers'>
<span dir='ltr'>(<data:label.count/>)</span>
</b:if>
</span>


Your data:label code may not match the above as there are so many templates. Find the code that in the HTML that begins with data:label and do an Internet search on that line of code. You may find a site that can advise on your particular template code.

No comments:

Post a Comment