Having your archive and category lists display as combo boxes instead of lists of links is a great way to lessen the clutter on the sidebar of your blog that can sneak up on you. To change the look, see below.

For Categories:

Add the following code to your sidebar where you want your category combo box to be displayed.
Alternatively, you can add it anywhere in your index.php.

<form action="<?php bloginfo('url'); ?>/" method="get">
< ?php
$select = wp_dropdown_categories('show_option_none=Select category&show_count=1&orderby=name&echo=0');
$select = preg_replace("#<select([^>]*)>#", "<select $1 onchange='return this.form.submit()'>", $select);
echo $select;
<noscript><input type="submit" value="View" /></noscript>

For Archives

The directions above in the category section apply also to the archive portion.

<select name="archive-dropdown" onChange='document.location.href=this.options[this.selectedIndex].value;'>
<option value="">< ?php echo attribute_escape(__('Select Month')); ?></option>
< ?php wp_get_archives('type=monthly&format=option&show_post_count=1'); ?> </select>

Note for Screenreader Users

If you’re using a screenreader such as Jaws for Windows or Window Eyes, you’ll need to keep in mind that these are the kind of combo boxes that will refresh the page when you land on an option, so be sure to use the appropriate key command to open the listbox and then arrow down and press enter on your desired option.

Thanks to Jai for providing the code for these, and to Mark at Weblog Tools Collection for pointing me to Jai’s link.

Originally published at Customerservant.com. You can comment here or there.