peterwsterling
Member
Posted 5 years ago #
How am I supposed to use the wp_get_archives function?
I'm using it with the format=option set, i.e.:
<?php wp_get_archives('type=monthly&format=option'); ?>
It creates a list of options, with the full URL for the selected one as the value. But what form code do I have to wrap this with to navigate?
Thanks,
Pete.
GaryofBeeston
Member
Posted 4 years ago #
Can I float this to the top, rather than starting a new thread? I have the same problem (running 2.2). The <option> code is generated fine, and I added the <select> tag around it, but there's no submit button or onFocus() - style code generated, so selecting anything on the list does nothing.
Which looks a bit silly (lucky for me, no-one ever reads my site...)
Gary
In Version 2.2, the native Archives widget offers a dropdown ability. Maybe you can use the example in lines 383-406 of wp-includes/widgets.php.