Thursday, June 28, 2012

How To Create Drop Down Label Widget For Blogger

This is also great tip those who are looking for
drop-down label menu.If your blog don't have
much space or want to reduce home page
size, this will help to you.So this drop-down
menu display your post categories,and labels
are link with them.So, each category post are
counting too.you can adjust size of the 
drop-down. follow these steps to add it to your
blog.


1. Log in to blogger account and Go to Design >> Edit HTML

2. Make sure you don't put check mark in  Expand Widget Templates

3. Find below code by using Ctrl+F  

<b:widget id='Label1' locked='false' title='Labels' type='Label'/>
4. Now replace above line (where you found) with below code.

<b:widget id='Label1' 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'> 
<select style='width:100%' onchange='location=this.options[this.selectedIndex].value;'> 
<option>Choose a Category</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/>)

5. Save your Template you are done.

9 comments:

  1. nice work.. its really nice..

    can i make a request?
    can you make a drop down for archive?
    or can you make a tutorial on how to customize the blogger archive and make it a drop down also?

    -jayryan09-

    ReplyDelete
  2. @Jay Ryan M

    Thanks. I will make a post about it. keep in touch..

    ReplyDelete
  3. I tried this, but when I save my HTML, i get an error message saying:

    Error parsing XML, line 1012, column 3: The element type "b:section" must be terminated by the matching end-tag "".

    Please help.

    ReplyDelete
  4. I got it to work! see: http://motionpicturegems.blogspot.com/
    Thanks for your help! - Tom

    ReplyDelete
  5. Nice one...thanks for this...Am working on it now.

    ReplyDelete
  6. Is here any chance I can change color?
    Thank you!

    ReplyDelete