Sorting by Random & Distance

This topic contains 9 replies, has 3 voices, and was last updated by  Paolo 10 years, 1 month ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: ,

  • Author
    Posts
  • #18454

    jonahcoyote
    Expired Member
    Post count: 89

    Hi there,

    I’m sorting by random in my main listing, but if someone searches by location the results still show listings by random (instead of by distance) which isn’t too useful. I’m assuming I can simply use pre_get_posts to change the way the search query orders things but what field do I sort by for distance?

    Thanks,
    Jonah

    #18496

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    I’m not really capable of answering this one. I flagged it for Stiofan.

    Thx for your patience,

    #18505

    jonahcoyote
    Expired Member
    Post count: 89

    Thanks Paolo!

    #18611

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Jonah,

    Can you show me where this is happening?

    Stiofan

    #18663

    jonahcoyote
    Expired Member
    Post count: 89

    Hi Stiofan,

    Take a look here: http://distressedmullet.dev/shops/ – I’ve got Random set as the default sorting option and you can see the list reflects this correctly. Now do a search for “Miami” in the “Near” input and search. You’ll see the search results are displayed randomly as well. It seems like if you search by location, it should always show results by distance. And if you search by keyword, it should always show results by relevance. Otherwise it renders those search features kind of useless if you want to sort by random on the main list. Make sense?

    Thanks for your help!
    – Jonah

    #18682

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Yes this looks like a bug, i will report it and get back to you.

    Thanks,

    Stiofan

    #18722

    jonahcoyote
    Expired Member
    Post count: 89

    Thanks Stiofan!

    #19026

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    This has been fixed and will be in the next version.

    Stiofan

    #19047

    jonahcoyote
    Expired Member
    Post count: 89

    Awesome! Any rough ETA?

    #19050

    Paolo
    Site Admin
    Post count: 31206

    Could be tonight, but most likely tomorrow.

    Thx

Viewing 10 posts - 1 through 10 (of 10 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount