How to create drop down label widget for Blogger

1. Log in to blogger account and Go to Design >> Edit HTML
    Make sure you don't put check mark in Expand Widget Templates

2. Find below code by using Ctrl+F

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

3. Now replace above line (where you found) with below 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'> 
<select style='width:100%' onchange='location=this.options[this.selectedIndex].value;'> 
<option>Click to choose a label</option> 
<b:loop values='data:labels' var='label'> 
<option expr:value='data:label.url'><data:label.name/> 
(<data:label.count/>) 
</option> 
</b:loop> 
</select> 
<b:include name='quickedit'/> 
</div> 
</b:includable> 
</b:widget>

You can change the wdth of drop-down by chaning 100%
You can change Choose a Category as your like, if you want.
If you want to hide the post counter so delete this code. (<data:label .count="">)

1 comment:

  1. Thanx. But how can I add this for multiple or different label category ? Pls help.

    ReplyDelete