Skip Navigation

[Resolved] filtering by distance not working/available?

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

Problem: I have a custom search View with a distance filter, but the inputs that let the User set the distance radius and units are not appearing on the front-end of the site.

Solution: It looks like the filter controls and the Query Filter are out of sync, and recreating the filter is necessary. Delete the distance Query Filter, and delete the corresponding distance filter control from Search and Pagination. Recreate the distance filter in the Search and Pagination editor, and the Query Filter will be automatically updated.

This support ticket is created 5 years, 3 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by jeffM-14 5 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#1366563

I am trying to:
Trying to add a map-based filter on a member directory to filter by distance [of the website visitor], and I am not sure why I can't get it to work.

Link to a page where the issue can be seen:
hidden link

I expected to see:
I want to have the "show results within ___ of __" as it shows in this tutorial https://toolset.com/documentation/user-guides/display-on-google-maps/filtering-and-ordering-map-markers-by-distance/

Instead, I got:
What you see here hidden link

Also, I have over 2,000 members (some do not have address/location data), but only 7 are showing up.

#1366615

Okay to add a distance filter, you should scroll to the top right corner of the View editor screen and click "Screen Options". This will allow you to turn on the Query Filter panel. Once that is open, delete the distance filter that is applied here already.

Then scroll down to the Search and Pagination panel and click "New filter". Select "Distance" as the filter type, and then continue through the configurations to insert that new filter. The corresponding Query Filter will be created automatically.

It looks like somehow the Query Filter and the Filter Controls became out of sync, so removing the Query Filter was necessary to recreate the Distance Fitler control. Let me know if you have trouble with these steps.

#1366783

My issue is resolved now. Thank you!