Skip Navigation

[Resolved] Combined Distance and Post Title Search

This support ticket is created 6 years, 6 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.

Our next available supporter will start replying to tickets in about 1.38 hours from now. Thank you for your understanding.

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 Luo Yang 6 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#901304

How is it possible to set a filter that you can have the Post Title and the Distance in an OR Search

So your have a Input "Type your Adress or the Name of the Company"

and then set the Filter to "Distance from GET variable Center OR post title similar to GET Company Name"

#901487

Hello,

There isn't such a built-in feature within Views plugin.

Views plugin is using WordPress class WP_Query to query the posts, so the post title filter and custom address field filter will use relationship "AND", there isn't such an option to achieve what you want:
set the Filter to "Distance from GET variable Center OR post title similar to GET Company Name"

If you agree, we can take it as a feature request, our developers will evaluate it.

#901613

set the Filter to "Distance from GET variable Center OR post title similar to GET Company Name"

There is no Way that i Can Combine that 2?

So that i've one field "seachdata" und than:
Show all Results Distance from GET['search data'] OR Post Title similar to GET['search data'] ?

#901651

OR is there a way to do it with PHP?

OR is it possible to set it up like:
Use Get parameter for company name - if that is that is NOT empty then show posts with similar title
if titleGET is empty then filter for Distance?

#901818

As I mentioned above, there isn't such a built-in feature within Views plugin, if you are going to use custom PHP codes, you can contact our experienced contractors:
https://toolset.com/contractors/