Display Archives in a Drop-Down Box

Send Snippet To: Save this snippet to Code Collector Pro -- view all maeghan's snippets
language: PHP
license: BSD

Code for Snippet:

                
<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>
comments powered by Disqus

Info

Tags: wordpress

Link to this snippet:


Download to Code Collector

To use the direct link to your snippet on CodeCollector.net either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 670
Date Added: 2009-04-27 23:52:48
Last Modified: 0000-00-00 00:00:00

Web Analytics