Thursday, July 9, 2009

Reduce or limit the number of labels shown in bloggers BlogSpot blog

 

Blogging since long time and the number of labels are too much to put on the website, at the same time you do not want to remove them.

best solution is to limit the numbers of labels which will be shown on the blog, lets say this limit is 3, then the labels above 3 articles will be shown.

Please follow this procedure:

  1. Login to blogger
  2. Click on layout
  3. Click on Edit HTML (Take backup of your template, if something goes wrong)
  4. Check the box before Expand Widget Templates
  5. Now find the following text with ctrl F
<b:widget id="Label1" locked="false" title="Labels" type="Label">
..
..
..
</b:widget>





Now replace the whole text with the new text, Be careful while selecting.




<b:widget id="Label1" locked="false" title="Labels" type="Label">
<b:includable id="main">
<b:if cond="data:title">
<h2><data:title></data:title></h2>
</b:if>
<div class="widget-content">
<ul>
<b:loop values="data:labels" var="label">
<b:if cond="data:label.count &gt; 3">
<li>
<a dir="data:blog.languageDirection" href="data:label.url%20+%20%22?max-results=5%22">
<data:label.name>
</data:label.name></a>

</li>
</b:if>
</b:loop>
</ul>
<b:include name="quickedit">
</b:include></div>
</b:includable>
</b:widget>
</b:widget..>



No comments:

Post a Comment