Code To Display Archives In Drop Down Format In WordPress Blog

Posted by

Hi,

You can use this code to display Archives in drop down format:

<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>

Thanks,

Shane G.

One comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.