Create a WordPress dropdown monthly archives
I’m absolutely thrilled to have been able to get a dropdown monthly archive at the sidebar finally!
This display is so very short, just perfect to replace the default one that was getting way too long, which will continue growing in length as long as new posts are being added.
Learn how to change that here!
A big thank you to Michael Martin of Pro Blog Design for his awesome tip on how to get this dropdown list!
Here’s how to get a dropdown list of your monthly archives
by just following these simple steps:
- Go to Site Admin | Editor | Sidebar (sidebar.php)
- Scroll down to find the following code :
<?php wp_get_archives('type=monthly'); ?> - Remove the above code and replace with this new code :
<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> - Click Update File to save edit and you’re done! Easy, huh!
Check further at WordPress Codex to learn other various ways to display archives list on your website.
Update: February 22 2010
Do check this recent article about creating an Archives page, using the WP_Archives plugin, if you’re interested to improve further. It’s truly a wholesome alternative way to have your archived posts with titles and dates automatically generated, with links that are beautifully displayed too.
You Might Also Like (using plugin: YARPP) :
- WordPress WP-Archives plugin is so awesome!
- Display WordPress Tags in a Dropdown Menu
- Life-long learning with WordPress Codex
- Dagon Design Sitemap Generator, another awesome plugin!
Tags: archives, blogging tips, codex, dropdown menu, wordpress





Get Updates!


February 18th, 2010 at 11:49 pm
Glad you liked the post Jacqueline! If there’s ever anything else you’d like to do, drop me an email and I’ll make sure to write up a post on it! :)
February 19th, 2010 at 3:05 pm
Thanks so much for the offer, Michael. You’re a gem!
Have a lovely Friday and wonderful weekend ahead.