this code creates a drop down menu with all Categories. i would like to learn how to modify it so it shows Archives instead of categories. i.e. sort posts by months. how should this be done?
thanks
<?php wp_dropdown_categories('show_option_none=Sort by Category'); ?>
<script type="text/javascript">
var dropdown = document.getElementById("cat");
function onCatChange() {
if ( dropdown.options[dropdown.selectedIndex].value > 0 ) {
location.href = "<?php echo get_option('home');
?>/?cat="+dropdown.options[dropdown.selectedIndex].value;
}
}
dropdown.onchange = onCatChange;
</script>