Skip Navigation

[Resolved] Combined Search field and distance filter in view

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

Problem:
The user wanted to use the distance filter in a view but it does not work.

Solution:
The search was also using Relevanssi to search in custom fields. In fact, debugging my views shows that when a term is used in the text search filter, the search query against the database does not include distance/geolocation parameters. Check these screenshots:
- With search box query: http://prntscr.com/shff99
- Without search box query: http://prntscr.com/shfgc4

According to our documentation:

Once you add a search filter that includes custom fields, the entire search operation is performed by the Relevanssi plugin, which means that Relevanssi is also responsible for providing the results order. This is why the Views sorting order options are not used.

Relevant Documentation:
https://toolset.com/documentation/user-guides/views/searching-texts-custom-fields-views-relevanssi/#integration-with-custom-searches

This support ticket is created 4 years, 7 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: Africa/Casablanca (GMT+01:00)

This topic contains 15 replies, has 3 voices.

Last updated by yannicN 4 years, 7 months ago.

Assisted by: Jamal.

Author
Posts
#1630057

Thanks for your answer. It is a great pity that this important function is not supported in this way. I will program my own solution.