WordPress.org

Ready to get started?Download WordPress

Forums

Monthly archives dropdown list (10 posts)

  1. JMHirst
    Member
    Posted 9 years ago #

    Hi,
    I have search for this using "month drop", "monthly archive" but can't come up with anything, so apologies if it's a common FAQ.
    Is there a plugin/hack or a simple bit of PHP that I can use to put all the months, including the year, into a dropdown list? It would need to be in a self-executing form, so if the user selected the month/year, the page would automatically show all the entries accordingly.
    TIA

  2. JMHirst
    Member
    Posted 9 years ago #

    Good grief that was damn quick!!!!!!!!!!
    Many thanks for that, works a damn treat!!!!!
    Cheers....

  3. Kafkaesqui

    Posted 9 years ago #

    Always quick when you're already using what's being asked for. ;)

  4. u02cdh
    Member
    Posted 9 years ago #

    Fantastic - been looking for this. I'm using it on my blog also now.

  5. gnarly
    Member
    Posted 9 years ago #

    Any idea how to do with without the aid of javascript? I want to use a submit button.

  6. aliasjanedoe
    Member
    Posted 9 years ago #

    I'm using this with styles like at alexking.org but I don't know how to make it look nice. Anybody know the general code I need to slip into the styles to adjust the width and color of this? Thanks.

  7. Kafkaesqui

    Posted 9 years ago #

    No Javascript:
    Nope. At least, I could show you how to use a submit button, but it too would have to use javascript. The reason is, the value for each archive option is an actual URL to the archive page, not a query argument that's passed to PHP. Something has to interpret the value as a link that needs to be passed to the browser.

    Style the form:
    Assign the form a class, lets say "archiveform", and set the various properties like this:

    .archiveform form option {
    width: 100px;
    color: #000080;
    }

  8. akalsha
    Member
    Posted 9 years ago #

    Hey, thanks! I just dropped by looking for something like this to compress my archives list, and this is perfect. :D

  9. aliasjanedoe
    Member
    Posted 9 years ago #

    How do you assign a class?

  10. aliasjanedoe
    Member
    Posted 9 years ago #

    Also, how do you change the position of it? When using the style found here, it gets pushed over and I don't know why.
    http://www.alexking.org/software/wordpress/styles/sample.php?wpstyle=diary

    I want to change it without moving anything else in the menu.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.