• Hello there,

    As the subject of this post suggests – when running a custom WordPress loop is it possible to ‘orderby’ two different things?

    My WordPress site isn’t used as a blog; each post represents an event.
    When the loop is run, I want these events ordered by date.
    If multiple events run at the same date and time, they should then be ordered alphabetically.

    This is what I have at the moment, which gets all the upcoming events for Sept 9th and spits them out in time order but how do I implement the extra alphabetising?

    query_posts(‘category_name=Programme&posts_per_page=50&orderby=date&order=asc&year=2011&monthnum=9&day=09’);

    I cannot find a solution anywhere online…

    Thank you in advance!

  • The topic ‘wp-query / Can you order by Date AND Title?’ is closed to new replies.