Archive links in Drop-Down Menu (Combo Box)

Here’s a simple hack you can modify your default theme in WordPress to get your Archive links to show in a drop-down menu (combo box) instead of having it spawn 10+ lines and take up precious space. Under Presentation -> Themes -> Theme Editor -> Sidebar Template, modify the following code

<?php wp_get_archives('type=monthly'); ?>


<form name="archive" action="post">
<select name="archiveLinks" size="1" onchange="parent.location = this.options[this.selectedIndex].value;" >
<option value="">Select an Archive</option>
<?php wp_get_archives('type=monthly&format=option'); ?>

Leave a Reply