• Hello,

    I am trying to make a search query, searching for a certain month using get_archives() with the parameter “format=option”.

    <?php $defaults = array(
              'type' => 'monthly',
              'format' => 'option',
              'show_post_count' => false); ?>
       <?php wp_get_archives($defaults); ?>

    My problem is that wordpress puts the URL of the archive to value=”” in the <option> tag. But what I want is to have the monthnum in the tag, like this:

    <option value="1">January</option>
    <option value="2">February</option>

    But wordpress puts it like this:

    <option value="https://localhost/wordpress/2008/01/">January</option>
    <option value="https://localhost/wordpress/2008/02/">February</option>

    I hope someone can help me!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘wp_get_archives()’ is closed to new replies.