Skip Navigation

[Resolved] Unable to set up a custom search that returns the desired results

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

Problem:

I am trying to: set up a custom search that searches custom fields of a custom post types. One of the fields is a date. The other two are custom address, the input is an address. I would like to search locations within a distance radius:

Pick up location and drop off location.

Solution:

There isn't such a built-in feature within Toolset Maps + Views plugin, you can setup only one distance filter for each view.

Relevant Documentation:

https://toolset.com/2017/12/toolset-maps-1-4-with-geolocation-filtering-by-distance-and-custom-map-styles/

This support ticket is created 6 years, 8 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 4 replies, has 2 voices.

Last updated by alessandroR-3 6 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#624720

I am trying to: set up a custom search that searches custom fields of a custom post types. One of the fields is a date. The other two are locations, the input is an address. I would like to search locations within a distance radius.

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

I expected to see: two custom posts that i have published

Instead, I got: no items found

#624818

Hello,

I checked the URL you mentioned above, there are two set of distance filters:
1) Two distance filters "Show results within xx KM"
2) Two location filters

You only need one distance filter and one location filter, please follow our document to create a new fresh view, and setup the distance filter, and test again:
https://toolset.com/2017/12/toolset-maps-1-4-with-geolocation-filtering-by-distance-and-custom-map-styles/

#624820

Why do I need only one location filter?
I need 2:
Pick up location and drop off location.
Can your plugin do it?

#624825

There isn't such a built-in feature within Toolset Maps + Views plugin, you can setup only one distance filter for each view, if you agree, we can take it as a feature request, our developers will evaluate it.

#624872

Thank you Luo, but for the moment I only need to build a MVP and I found a way around that problem.