108 A drop down menu for your labels

If you have a long list of labels in your sidebar, you could be losing valuable space to display other information. A different method of displaying your labels is to use a drop-down menu: this takes up very little space at all, and is useful for helping your readers find the information they need. This post explains how a drop-down menu for your blog labels can be achieved in just a few easy steps.

This hack was originally developed by Ramani of Hackosphere, though for this tutorial I have further simplified the process so there are only two steps required:

  1. First you should make a back-up of your existing template by going to Template>Edit HTML in your Blogger dashboard and clicking the "download full template" link which is near the top of the page. It is always good practise to back-up your template before making any modifications at all, just in case you make a mistake and later need to use your old template again.
  2. Next you will need to find the following line of code in your blog's template:
    <b:widget id='Label1' locked='false' title='Labels' type='Label'/>
    To find this line, you do not need to tick the expand widget templates box. This is the un-expanded tag used to display the label widget in your blog template. Highlight all of this line, and replace this with the following section of code:
    Then save your template and take a look at your new drop-down menu!

Once installed, you can then move the label widget to other areas of your blog in the layouts section of your dashboard, just like any other widget.

I hope this tutorial has been useful to you. Please feel free to leave your comments and suggestions below.

Technorati Tags: | | | | |

108 Comments:

22 November 2007 14:47 The Seriously Grey Network said...

Thank You Thank You Thank You!

=D

22 November 2007 18:01 Dav7 said...

for now I don´t need, but my list is growing!!

by the way, I would like to know a way to edit the labels I choice in all my posts, not having to go edit each one and change the labels

like now, I have a label called Paid.nu, now I want to change all my posts with that label to other name, Paid.vg

:S

22 November 2007 19:33 ProphetMother said...

Great hack! I've been wanting something like this! For some reason when I add it, I get errors saying "this isn't well-parsed." Even on things that were already in my html before pasting this. Ugh.

22 November 2007 23:14 The Seriously Grey Network said...

to dav7:
I just did this this morning. It's very simple, really. Under the "Posts" heading, hit "Edit Posts" and to the left you'll see a list of all of your labels. Simply click on your "Paid.nu" label link, and it'll give you a list of all of the posts with that label. From there, click the "All" next to the drop-down menu, and then in the drop-down menu at the bottom click "New Label..." and enter "Paid.vg" in the dialog box. That label will then be applied to all of those posts. Then, click the drop-down menu again, and at the very bottom they have an option to remove labels. Select "Paid.nu" and it'll be removed! And there you go!

Hope this helps, and doesn't confuse you! =P
Happy Thanksgiving!

22 November 2007 23:21 Dav7 said...

woooowwww

I had never notice that!!

now is done easily!!

thanks a lot :D

23 November 2007 07:18 Tech For Novices said...

thanks we are using it :)

26 November 2007 06:21 Carnation said...

Hi Amanda
ur site is very helpful...
Amanda do you have a hack for drop down listing of each label in the Label list.
It would be really really very helpful.

29 November 2007 13:08 Surya said...

It's very helpful. I'm using it now. Thank you very much!

4 December 2007 23:19
cumulus said...

hey, thanks a lot Amanda!
This is a great solution, just the one I was looking for.
Do you know, per chance, any way of changing the color, i.e. reversing type and bckgrnd, black to white? I was looking at the script, but being more designer than coder, couldn't figure out how...
Thank you so much!

1 February 2008 11:37 Charleybrown said...

I had just deleted my labels widget because it had got too long. Your instructions were clear and easy...thank you!

3 February 2008 20:19 Angie said...

Wow! Fabulous!!!! I love the labels option, but hated how much room it took up on the side. Thanks!

8 February 2008 20:23 Scott Boutwell said...

Hi Amanda:

Thanks for a great widget (label drop down).

Question: is there a way to 'clean up' the look? I noticed that the drop down bar is a little too low, in regards to the Labels title. Thanks.


Scott

12 February 2008 08:50 Nesher said...

Amanda,
Thank you very much!!!!!

12 February 2008 09:11 Nesher said...

I am placing a post on my blog, speading a word about your solution:
http://blogging4good.blogspot.com

22 February 2008 03:11 Shen said...

Thanks for this code it really helps I am placing it at http://newzaroundus.blogspot.com :)

3 March 2008 10:55 ren.kat said...

Am I seriously the only one who doesn't have Label in my html??

17 March 2008 15:58 Babette said...

Another good one Amanda. :) Thank you!

22 March 2008 10:28
Lynn said...

i've tried this on as well as the top commenters. it's now in my site and i like it. you've got a very informative and helpful site especially to a newbie like me. keep up the good work!

25 March 2008 05:02 Melissa said...

I was just wishing for drop-down labels and then I stumbled across your blog with instructions. Very cool! Thanks so much!

30 March 2008 10:14 Guardian Angel said...

Hi Amanda,

Your blog is really very helpful. I am now using this technique.

However, I am having some problems about the 3-column footer and tab view installation.

I send you a separate mail through Entrecard and I hope you find time to read it.

Thanks really.

2 April 2008 10:25 Jean Chia said...

hi amanda, i wanted to say a big thank you for sharing this info! i've installed this widget, your instruction is simple & it works well with me! Thanks alot!! A big hug to you!! :)

Jean Chia

9 April 2008 20:09 Jeff said...

Perfect. Thank you!

21 April 2008 19:29 Major Rakal said...

Thanks for a quick and easy labels fix. My labels had pushed everything else in my sidebar "below the fold". This is so much neater!

BTW, I happened on your blog a couple of months ago while searching for info on customizing templates. Yours is the best I've seen. So far I have converted my standard Rounders3 template to a wide (bt still 2-column) version and started using the post summaries customization. I think tabs are going to be next!

1 May 2008 10:32 twinkletoe said...

Hi Amanda,
This tutorial is great. Very helpful.
I'm using it in my blog.
Thanks a lot. You're such an angel.

10 May 2008 14:57 Jane said...

Hi Amanda I really love this and have been looking for something like this to fix my labels so thank you :)
Is there a way to change the size of the drop down box ? its ruining my beautiful template :P :) cheers v

10 May 2008 21:26 My Vision said...

You are a lifesaver. I just did this and it worked just as I wanted. Before I started reading your website this afternoon, I was seriously considering moving my blog from blogger to wordpress because I haven't been able to do what I want with my blog. Now I'm going to continue reading your advice and follow some of your pearls of wisdom.

16 May 2008 22:17 Fotografia Profesional said...

WOWWWWWW!beautiful trick!!!
Jane if you would change the size this is the STYLE code:


select onchange='location=this.options[this.selectedIndex].value;' style='width:200px; background-color:#fff; color:#000;'


the width is 200px but i think you can change this!

16 May 2008 22:19 Fotografia Profesional said...
This comment has been removed by the author.
16 May 2008 22:57 Fotografia Profesional said...

i haxw a request:
see my blog,
http://fotografiaprofesional2008.blogspot.com/

is only a column and I want to position all the widgets with dropdown menu On An Unique Horizontal Line! is it possible? please help me!

17 May 2008 12:31 Gerald said...

Fantastic space saver and used it in conjunction with the Show labels without the post count hack, I've managed to do a drop down menu with the label count. Its all here for all to see at http://royedsworld.blogspot.com

17 May 2008 20:46 jpfivesevenzor said...

someone else asked and answered this already but i didn't understand the response, hopefully you can clear it up for me. the background of my blog is black and the font is white. is there a way to make the dropdown black with a white font also so it matches? Thanks

20 May 2008 07:33 Laura said...

beautiful! worked like a charm, thanks!

3 June 2008 23:17 Pinky said...

Hi... works great. Thanks heaps

5 June 2008 01:02 lishun said...

is there a way to create this for archives in the classic template?

10 June 2008 13:23 Y. S. said...

Thanks a lot. It looks much better now. :)

6 July 2008 17:49 A Careful Shopper said...

Amanda, Amanda, Amanda. Do you know how brilliant you are? Myself and everyone else here think you are!

I have been looking (whenever I had a chance) to find a drop-down widget specifically to solve my ever-growing list of labels. They all had a (for me!) very complicated installation procedure or too many bugs.

I even changed my template to one that HAD drop-downs (from someone else). But it could only show about 50 labels before running into problems.

Then I discovered your site a couple months or so ago and am now using one of your templates. Very happy with it.

Then yesterday, I found this drop-down widget here. Unbelievable. So simple to install, as you said it would be. I made one change after installation to customize the info box by expanding the widgets first. Again, no problems. I also moved it from the sidebar to
a more appropriate position (for the kind of blog I have).

Life is now good for me thanks to you!
Vic

9 July 2008 00:27 dini said...

This was really helpful - thank you so much.

Dina @ mamadinis

19 July 2008 11:53 Ankit said...

Amazing trick...Thanks !!!

http://exclusivearena.blogspot.com/

20 July 2008 22:37 Sumit Agarwal said...

thanks for help http://www.computersolution.co.cc

1 August 2008 12:00 BassFishingDem said...

Thanks, but how can I integrate this drop down menu with the TOC collapsed labels hack? I think I've done it correctly because it seems to be working. I got rid of the onchange part and replaced it with action="#toc" because I have an a name tag placed above my TOC. Then I made the hack change by changing the expr: in your code to the expr: from the hack. The action="#toc" may not be necessary though. I implemented it into my test blog before messing with my main template first and played around with things.
< and > are removed in the code below so it'll show up.

select action='#toc'
option Select a label /option
b:loop values='data:labels' var='label'
option expr:id='data:label.name' onclick='javascript:showLabelPosts(this)' data:label.name/
( data:label.count/ )
/option
/b:loop
/select

Of course, I've added the additional script and page element according to the code at growyourblog.blogspot.com

1 August 2008 12:04 BassFishingDem said...

Ugh...Correction
It appears to work in Firefox 3.0, but not in Safari.

1 August 2008 19:59 da scribe said...

as always you are a lifesaver :)

4 August 2008 05:06 Anu said...

Thank you Amanda for your wonderful tutorials.
my blog is http://mumbaidailysnapshot.blogspot.com
and I have mmade it 3-column in minima blue.
I have also put the labels drop down menu, as you have instructed so well. Is there a way of changing the backgroung of the menu. It is white. I want it sky blue to match my blog. And how can I reduce the width a little?

4 August 2008 09:45 Purpled Sky said...

Amanda, thank you! thank you! thank you!!!!

xoxo

9 August 2008 21:04 Sandra said...

Thank You! I had one on my blog, but all it did was cause popups!

I am so happy to have found your tip on doing this and the popups are now gone. lol

11 August 2008 08:03 Mediocre Chocolate said...

This is exactly what I was looking for. Brilliant. However, it's too wide and I can't see the scroll bar. How do I change the width?

16 August 2008 14:29
Dav said...

I think there is ISSUE with this code... it does show labels in drop down... but after implementing this...

say i select labelw ith 40 posts, it showed all 40 posts on one page, even though i have setup 7 posts per page in settings.

Doing something wrong or more coding needed to fix this?

3 September 2008 12:00 Samantha Dixon said...

Umm I don't seem to have that line in my HTML... is it because I'm using a different kind of template?
Is there a way to put it in?!

14 September 2008 11:10 Salt N Pepa said...

Woohoo..worked perfect too easy! :-))

15 September 2008 15:30
Anonymous said...

i dont have that line of code..help!
i have DOTS templtae

27 September 2008 10:33 Napaboaniya said...

Thanks so much for this tutorial on drop down menu for labels. It helped saved a lot of space and makes the page neater :)
Thanks!!!

12 October 2008 22:24 abo-shahd said...

شكرا لك ..
استفدت منك كثيرا

English translation:

Thank you ..
I benefited you many benefits

23 October 2008 10:05 I.R.T said...

Thank you so much for this.
It really helped my blog alot, especially since I'm blogging for an entertainment blog, there's so many labels!

You're a legend!

http:://iaretalk.blogspot.com

25 October 2008 06:53 danial said...

thanks so much
works wonderfully

2 November 2008 10:03 Prince Gomolvilas said...

Once again, so so so so so AWESOME!

19 November 2008 02:51 mindy said...

WOW I would SOOO much like this widget! But the picture doesn't work, so I don't know what to replace! can you help me?

27 November 2008 11:02 seiken said...

Thanks, It really helps...

8 December 2008 06:08 head-lint said...

I'm completely new @ this and your tutorial was amazingly simple to use! THANK YOU.

--- Dyn
http://head-lint.blogspot.com/

14 December 2008 08:10 fon said...

how about a dropdown menu for blog archive? please..thanks!

17 December 2008 14:23 DerAndre said...

NOOO :D
WHERE IS THE CODE? xDD

I finally found the widget I was ever dreaming of and now it says "Service Temporarily Unavailable"

WTF :D:D

17 December 2008 14:29 DerAndre said...

How can I change the width of the widget? this one is too wide for my sidebar

18 December 2008 16:15 Lille skvat said...

Thank you. It works perfectly! :-)

20 December 2008 14:47 Manish Ahuja said...

111 Labels with many more to come considering the fact that I've been blogging only for a month. I must say this is my first visit and I'm a fan already. Keep up the great work guys. Thanks a ton

Manish :)
http://surrealnirvana.blogspot.com/

21 December 2008 01:01 محمد said...

Hello,
My name is mohamed
I just pasted the code in HTML but I am not able to follow the other step

Please help

2 January 2009 04:43 Genel kultur said...

Thanks Amanda.Finally i found this hack .i am thinking about it for along time.

14 January 2009 13:49 Charlton said...

awesome! works perfectly! thanks a lot amanda!

28 January 2009 11:43 Sherly Aji said...

Thank you very much for the info, but i dont want my label in one list. i want to go back in my orginal stage is it possible?

4 February 2009 12:28 kater said...

thanks for sharing it . it is very easy to understand I will implement it in website design

14 February 2009 04:12 A Doomed Lover said...

I can't see what is in the second box(the code that I should input. please if anyone can see it copy it for me in your comment. please please please I need this

14 February 2009 20:54 Alper said...

Thank you, Amanda! Works fine!

Have a nice weekend!

Alper

--
http://www.bulut.de/

19 February 2009 01:12 Chicago Ray said...

Beautiful,however it would be astounding if the labels could present themselves in alphabetical order ;>)

21 February 2009 11:55 Author 2 said...

thanks for the trick, helps reduce the clutter on my blog.

<3

2 April 2009 14:08 Saku said...

Hey Amanda,

How can i add two label categories i.e.,

Online Games:

Arcade
Puzzle
Management
..........
........
........

and

Download Games:

Action
Arcade
Puzzle
Kids
Tycoon
.........
.........

like this i want to add two different label categories online and Download Games...

How can i add?

My blog: http://saku-games.blogspot.com/

I want like this blog:

http://www.gamezlinks.net/

Please help me Amanda, it's Urgent

Thanks in Advance

29 April 2009 09:28 Beatriz Macias said...

Thank you so much for this. I am always afraid I am going to do irreparable damage to my blog, but your tutorial was easy and soooo helpful. Thanks again.

5 May 2009 18:29 Selly said...

Hey, I can't see the code, it says this:
Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Apache/1.3.33 Server at bloggerbuster.com Port 80

Can someone copy and paste that code here?

25 May 2009 12:06 Mados said...

thanks for you

www.tempobox.blogspot.com

5 June 2009 15:37 Emily Cross said...

Amanda, Help.

when i tried to put this code into blogger, i got this message:

Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The element type "b:section" must be terminated by the matching end-tag "".

17 June 2009 15:45 Rachel said...

Hi, Amanda --

It looks like the code is gone (there's a message that the service is temporarily unavailable). Can you repost this? I really need this widget!!!!!!!! :)

Thanks

1 July 2009 11:32
Anonymous said...

Hi Amanda,
I got the same error msg as Emily as quoted on top:
We were unable to save your template
Please correct the error below, and submit your template again.
Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The element type "b:section" must be terminated by the matching end-tag "".
Need your help there. Thanks :)

1 July 2009 12:00 Dummy Essentials said...

Hi Emily,
This is for all those who are getting the same error as yours. You get this error because you might be clicking on Expand Widget Templates. Make sure you dont click there and search for the line as Amanda has told, replace it with the piece of code and then this code works fine :) Incase you still face the problem you can get back to me here:
http://dummy-essentials.blogspot.com/
will be glad to help u out.

9 July 2009 00:22 Nicole said...

Oh no. I tested this code out not too long ago and worked great. At the time, I didn't think I needed. Well, now I would love to have it and now the "Server Temporarily Unavailable." Bummer.

9 July 2009 00:28 Nicole said...

Oh Yay!!! I was able to get it! Thank you very much. Having the pull-down labels really helps clean-up my sidebar.

Thank you,
Nicole

16 July 2009 09:17 Chris Flynn said...

Thanks a million

25 August 2009 10:59 Arrica Lee said...

Thanks a lot for the tips!

31 August 2009 11:17 lowellpendon said...

Thanks for sharing this little tweak. Very helpful.

Got a question, is it really necessary to display 'Labels'? What are the disadvantage of removing 'Labels' in our blogs?

Thanks

25 September 2009 15:44
Anie said...

Thanks Dummy Essentials for posting the link,,, it really helped.

22 October 2009 14:05 oh, hello friend. said...

:(

"Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. "

24 November 2009 12:57 Shumaila designer said...

good work man
...................................
http://pcsoftwaresdownloadplace.blogspot.com/
...................................

26 December 2009 04:31 ROSIDAH said...

TY for the help :)

30 December 2009 05:19 Anara said...

Beautiful! I cannot believe how easy that was! I changed the title to "Directory of Post Labels" because my blog is mainly about directories of special needs resources and I was so thrilled to see it work the first time! Thank you!

24 January 2010 20:35 Shahid said...

wow nice article discussion thx for sharing
http://www.top100moneymakingways.blogspot.com/

21 February 2010 05:13 KittNLuv said...

Please tell me you still have this code?! I've been looking every where for this option. Right now your iframe has godaddy.com. :( Thankyou!!!

12 May 2010 18:02 Jyothi said...

hi where is the code?

13 May 2010 11:09 Jodi said...

Where is the code at Amanda? Godaddy.com is where the code should be!

8 June 2010 19:31 Guitar Chords said...

great tutorial..thanks for sharing

14 June 2010 07:51 Arcade Download said...

Nice post! Introductions and greetings of friendship from me.

7 September 2010 07:40
Anonymous said...

There's some great resources/info on this blog, but it seems to have become more and more neglected by it's owner over the past year or so, with things not working properly or similar which is a shame

2 May 2011 22:40 Early Intervention Speech Therapy said...

Uh-oh...where's the code? I don't see it!

20 May 2011 00:12 Penis Enlargement Pills said...

Thanks for taking the time to discuss this, I feel strongly about information and love learning more on this. If possible, as you gain expertise, It is extremely helpful for me. would you mind updating your blog with more information

20 May 2011 00:25 Penis Enlargement said...

I am thoroughly convinced in this said post. I am currently searching for ways in which I could enhance my knowledge in this said topic you have posted here. It does help me a lot knowing that you have shared this information here freely. I love the way the people here interact and shared their opinions too. I would love to track your future posts pertaining to the said topic we are able to read.

23 May 2011 16:24
Anonymous said...

i am donna pinto,from what I can read. It has been sad news and scam to everyone about spell casters or so. But to me they are so real cause one worked for me not quite two weeks. I traveled down to where his shrine his and we both did the ritual and sacrifice. I don't know about you but spell is real;love marriage,finance voodoo, get your ex back voodoo,love voodoo,lottery voodoo,weight loss voodoo,money voodoo, business voodoo,it's all he does. I used my money to purchase everything he used he never collected a dime from. He told me I can repay him anytime with anything from my heart. Now I don't know how to do that. If you can help or you need his help write him on nativedoctor101@live.com. Thank you.

5 June 2011 10:58
Anonymous said...

I am nancy,from what I can read. It has been sad news and scam to everyone about Voodoo casters or so. But to me they are so real cause one worked for me not quite two weeks. I traveled down to where his shrine his and we both did the ritual and sacrifice. and now me and my ex are living very ok now.I don't know about you but Voodoo is real;love marriage,finance, job promotion ,lottery Voodoo,poker voodoo,golf Voodoo,Law & Court case Spells,money voodoo,weigh loss voodoo,diabetic voodoo,hypertensive voodoo,high cholesterol voodoo,Trouble in marriage,it's all he does. I used my money to purchase everything he used he never collected a dime from. He told me I can repay him anytime with anything from my heart. Now I don't know how to do that. If you can help or you need his help write him on (nativedoctor101@live.com) Thank you.

23 August 2011 10:50 website design said...

I’ve been visiting your blog for a while now and I always find a gem in your new posts. Thanks for sharing.

26 August 2011 07:36 Domain registration said...

I appreciate your blog..Keep posting this type of articles..Its really a wonderful job done by you.

27 September 2011 07:43 freak said...

i cant see the cde in second step ,why ? plz help

13 October 2011 07:53 Domain Booking Through Debit Card said...

Good article and very valuable information. Keep it up!

23 November 2011 22:16 Me said...

Where's the code?

23 November 2011 22:17 Me said...

Do you have a code for the "page" drop down menu?

Post a Comment

Browse through the Archives

All existing posts are still available to view while I'm working on the site, albeit seen in a much simpler interface. Feel free to browse through the archives to find tutorials, templates and articles to help you build a better blog:

Blog Archive

© Blogger Buster 2010 Home | About | Contact | Hire Me