WordPress.org

Support

Support » How-To and Troubleshooting » Query Posts to OrderBy Date and then Random?

Query Posts to OrderBy Date and then Random?

  • rlthorman
    Member

    @rlthorman

    I would like to order my posts first by date, and then randomly.

    Using the function query_posts and orderby doesn’t work. I can randomize the posts, but I cannot order them by date first and then randomize those posts within a date. Presumably, this would look like

    query_posts(array('orderby' => 'date rand'));

    But that randomizes posts and ignores the date. I thought you could order my multiple values, but it doesn’t seem to be working.

    Any thoughts?

  • The topic ‘Query Posts to OrderBy Date and then Random?’ is closed to new replies.