Skip Navigation

[Resolved] distance filter setup

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

Problem:

I have mutlitple posts with a custom field postal code from the toolset map plugin. I have a view that searches through this post with a textfield but i would like to filter the post with the distance search filter. But i cannot get it to work properly.

Solution:

Please check these:

https://toolset.com/forums/topic/distance-filter-setup/#post-1321905

Relevant Documentation:

This support ticket is created 5 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by Wim 5 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#1321859

Wim

Tell us what you are trying to do?
I have mutlitple posts with a custom field postal code from the toolset map plugin. I have a view that searches through this post with a textfield but i would like to filter the post with the distance search filter. But i cannot get it to work properly. Is a map needed to make this work?

Hope you can guide me in the right direction.

Kind regards,

Wim

#1321889

Hello,

The distance search filter does not need map, it needs just a custom address field, you can follow our document to create a post view, and setup the distance filter:
https://toolset.com/documentation/user-guides/display-on-google-maps/filtering-and-ordering-map-markers-by-distance/

Section "Filtering Markers by Distance"

#1321891

Wim
screen toolset.jpg

Hi Luo, i am back up and running again, sorry for the inconvenience....you asked how the custom field was set up?

#1321905

Yes, you are correct, it is a custom address field.

For the problem: But i cannot get it to work properly.

Please check these:
1) Make sure you have setup the google map API key by following our document:
https://toolset.com/documentation/user-guides/display-on-google-maps/creating-a-google-maps-api-key/

2) Follow the document I mentioned above to setup the post view with distance filter:
https://toolset.com/documentation/user-guides/display-on-google-maps/filtering-and-ordering-map-markers-by-distance/

3) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2019, and test again

4) If the problem still persists, please provide database dump file(ZIP file) of your website, also point out the problem page URL and view URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1322023

Wim

Hi Luo,

I got it working now. The irrelevant results were due to the relevanssi plugin that was also installed and active. If i deactivate this the results are showing correctly. Is the relevanssi plugin incompatible with toolset as you know of?

#1322129

Wim

Nevermind the above comment. I think i got it working now, going to do some further testing.
Thanks for guiding me!