V2 Advanced Search – search by distance

This topic contains 10 replies, has 2 voices, and was last updated by  Alex Rollin 4 years, 11 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #491485

    vivek
    Full Member
    Post count: 246

    Hi, am a bit confused so can you pls help me out:

    1. I have set up the ‘search by distance” in the search settings in the CPT, and it appears in the search bar, but it seems to not work ie does not filter results by distance. Is this supposed to work in v2 or not (i read somewhere that its not functional in V2 yet, hence asking)

    2. I have been reading about the compass for ‘near me’ search, based on the ‘near me’ distance set in GD settings – but i do not see that in the search bar either. ( read somewhere that it appers if autocomplete is enabled in location settings, that is done, yet i don’t see it- also not sure how that is related to autocomplete)

    thanks, Vivek

    #491486

    vivek
    Full Member
    Post count: 246
    This reply has been marked as private.
    #491541

    Alex Rollin
    Moderator
    Post count: 27815

    Have you removed GD Post Distance from the archive item?
    Hard to tell if it is working without that item displayed.

    The compass has been removed and replaced with the Near Me text in the near search field.

    #491550

    vivek
    Full Member
    Post count: 246
    This reply has been marked as private.
    #491696

    vivek
    Full Member
    Post count: 246

    However, the other issue is that even after Near me is clicked and geolocation is done, that only works temporarily.

    On near me location page, if search by distance (SBD) is done then results are filtered for distance, and Distance to post (DTP) is also shown in the archive items on the search results page.

    However, even after that once other CPT/detail/ other pages are visited, and then again search by distance is done on the seach bar on some location / CPT page, then again results are not filtered by distance in SBD, and no DTP is shown anymore – so the lat/long seems to be not persisting and gets lost.

    Is this expected behaviour or am i doing something wrong?

    #491724

    Alex Rollin
    Moderator
    Post count: 27815
    This reply has been marked as private.
    #491745

    vivek
    Full Member
    Post count: 246
    This reply has been marked as private.
    #492092

    Alex Rollin
    Moderator
    Post count: 27815

    Search by distance works with near search. Try it out and let us know.

    Just type pune into the field without selecting “IN”

    #492093

    Alex Rollin
    Moderator
    Post count: 27815
    This reply has been marked as private.
    #492319

    vivek
    Full Member
    Post count: 246

    Understood. Thanks very much, Alex.

    Also, wanted to check is there a possibility to sort the search results, like one can on an archive page. I am doing a default distance to post- nearest sorting, but in case a user wants to sort by name, or rating how can that be done in the search page?
    I do see a parameter in the URL “&sort_by=” but not sure how it works?

    #492376

    Alex Rollin
    Moderator
    Post count: 27815

    Please see: https://wpgeodirectory.com/docs-v2/places/search/#faq
    Sorting options do not apply to search results.

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

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

Open Support Ticket