Show Labels containing specific number of Posts

Step 1 : Login to your Blogger Account and go to Layout section of your Blog.

If you don’t have any Labels widget then add it by clicking ADD Page ELEMENT link in the Page. Then navigate to EDIT HTML subtab and Check EXPAND WIDGETS box.

Step 2 :


Now search for this Line.

<b:widget id=’Label1′ locked=’false’ title=’Labels’ type=’Label’>

Now below this line , you will find this code

<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>

Now replace the above code with the following code.

<script type=’text/javascript’>
var labelnum = 0;
<b:loop values=’data:labels’ var=’label’>
if (<data:label.count/> &gt; 2) {
document.write(&quot;<li><a expr:href=’data:label.url “?max-results=5″‘
rel=’nofollow’><span><data:label.name/></span></a>(<data:label.count/>)</li>&quot;);
}
</b:loop>
</script>

That’s it , you have successfully implemented the “Show Labels with specific number of Posts ” hack in your blog.

Category: Uncategorized

Written by: ikogsakanding [ 1505 Posts ] (Author Profile)
blogs about latest trends, the internet, the tech news and the local blogosphere. You can follow me via Twitter and Facebook .
Posted on: Wednesday, March 18th, 2009 at 2:28 pm with 0 Comments.

Leave a Reply