Support » Fixing WordPress » How to use wp_get_archives?

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


Viewing 2 replies - 1 through 2 (of 2 total)
  • 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…)


    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to use wp_get_archives?’ is closed to new replies.