Forums

Query_post week days? (6 posts)

  1. headphonesilence
    Member
    Posted 2 years ago #

    Hi!
    I would like to sort my posts by week days.

    When I click on monday, it will display posts from the upcoming monday.
    When I click on tuesday, it will display posts from the upcoming tuesday and so on.

    Any suggestions on how to do such thing?
    I imagine it's something with query_post - like here: http://codex.wordpress.org/Template_Tags/query_posts#Time_Parameters
    But I don't know much more about it.

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    Not sure what you mean by 'upcoming' so will suggest you look at using the daily arguments with Template_Tags/wp_get_archives

  3. headphonesilence
    Member
    Posted 2 years ago #

    By upcoming I mean I use post as events. I make the post visible by publishing it on the future date and displaying only upcoming posts in my index.

    So when I click on "monday" it should display only posts from the upcoming monday.
    What exactly do you suggest?

    I have looked on the website you suggested. This for example would display only posts for the upcoming week, I guess:

    <?php wp_get_archives('type=weekly&limit=1'); ?>

    I guess I am to replace "weekly" with a week day like "monday". Would that even work?

  4. MichaelH
    Volunteer
    Posted 2 years ago #

    Not sure if I'm helping but will point you to:
    http://www.google.com/search?q=wordpress+display+future+posts

  5. headphonesilence
    Member
    Posted 2 years ago #

    Thanks I'll take a look at it :)

  6. cocobongo
    Member
    Posted 2 years ago #

    I'm looking for the same (only that not upcoming posts, just regular posted posts) where I get the latest post made a Monday, the latest post made a Tuesday and so on, however, wp_get_archives doesn't have a "day of the week" option, unless it's not listed by mistake. Any idea on how to achieve this?

Topic Closed

This topic has been closed to new replies.

About this Topic