The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

How to use wp_get_archives? (3 posts)

  1. peterwsterling
    Posted 9 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?


  2. GaryofBeeston
    Posted 9 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...)


  3. MichaelH
    Posted 9 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic