you are here: codestackercodes [RSS]wordpress archives dropdown

wordpress archives dropdown

<!-- original way -->
<?php wp_get_archives('type=monthly'); ?>

<!-- dropdown -->
<select onchange='document.location.href=this.options[this.selectedIndex].value;'>
	<option><?php echo attribute_escape(__('Select Month')); ?></option>
	<?php wp_get_archives('type=monthly&format=option&show_post_count=1'); ?>
</select>

Comments