How To Display WordPress Archives in a Drop Down Menu

Sometimes you don’t want your archives taking up so much space in your sidebar or footer or elsewhere. Here’s a snippet that you can add anywhere in your template files to display a drop down menu of your archives in order to conserve space:

{code type=php}

This will produce a little something like what’s shown in the thumbnail above.