Skip Navigation

[Resolved] Add geo locate to custom search

This thread is resolved. Here is a description of the problem and solution.

Problem:

How to use a distance filter in maps and is it possible to have it without maps?

Solution:

Follow the documentation below to learn how to set a distance filter in Maps:

https://toolset.com/course-lesson/filtering-and-ordering-map-markers-by-distance/

To have a distance filter outside of the maps you need custom development.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 3 replies, has 2 voices.

Last updated by Christopher Amirian 1 year, 8 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2669991

I have a custom search filter set up on this page:

hidden link

I have added an address field to the RFG that is displayed in the results linked to Google Maps and was looking to add a field to the search filter to return results on the table view within a distance from the users location. So user could use current location (or a defined location) and see the results within a distance from that location.

is this possible to do on a custom search with table view?

#2670487

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

Only filtering and ordering is possible using Toolset and here is how to do so:

https://toolset.com/course-lesson/filtering-and-ordering-map-markers-by-distance/

Thanks.

#2670691

Thanks for the info, that is on a map search, can I add a filter based a users location compared to an address field in a custom search that returns a table view?

Many thanks.

#2671093

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

No, unfortunately there is no such feature. You will need to implement this using the Query Filter custom code:

https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query

As it is outside of our support scope you can hire a developer to do so:

https://toolset.com/contractors/

Thanks.

#2671109

Thanks for your help