Skip Navigation

[Gelöst] Combined Distance and Post Title Search

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

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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)

Dieses Thema enthält 4 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Luo Yang vor 6 Jahren, 6 Monaten.

Assistiert von: Luo Yang.

Author
Artikel
#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/