lilst of all events sort by postcode

WordPress Event Management, Calendars & Registration Forums General Question lilst of all events sort by postcode

This topic contains 3 replies, has 2 voices, and was last updated by  Stephen Harris 11 years, 2 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3528

    Hello!
    I would like to sort the Events by Postcode.
    I thought i have only to set up the query (order by) but i can`t even find the query string.
    How can i realize it?

    Some help would be nice
    janko

    janko
    #3547

    Hi Janko, I’m afraid you can’t. There isn’t even the ability to query events by a given postcode (this will be in the Pro add-on).

    Stephen Harris
    #3562

    thank you for your fast answer.
    I think it must be possible, because the postcode is in the DB and then it must be queryable.
    maybe i find by myself, then i will post.

    janko
    #3563

    Hi Janko,

    Well yes, its possible (I meant just not ‘as is’ 🙂 ). But its by no means simple. The post-code data is not attached to the event, but rather the venue, and the venue is attached to the event. So what you would have to do is first order the venues according to the postcode, and then order the events according venue. WordPress doesn’t offer support for sorting posts (events) by taxonomy (venue) – so it would require some custom SQL.

    Stephen Harris
Viewing 4 posts - 1 through 4 (of 4 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.