How To Display WordPress Archives in a Drop Down Menu
Sometimes you don’t want your archives taking up much space in your sidebar, 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:
FREE EBOOK
Your step-by-step roadmap to a profitable web dev business. From landing more clients to scaling like crazy.
FREE EBOOK
Plan, build, and launch your next WP site without a hitch. Our checklist makes the process easy and repeatable.
<select name="\"archive-dropdown\"" onchange="document.location.href=this.options[this.selectedIndex].value;"><?php echo attribute_escape(__('Select Month')); ?><?php wp_get_archives('type=monthly&format=option&show_post_count=1'); ?>
This will produce a little something like what’s shown in the thumbnail above.
Source: WPhacks.com
Tags: