Skip Navigation

[Resolved] Adding multiple search variables in query filter

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

Problem: I would like to set up a Query Filter that shows results with any of several different custom field values.

Solution: Use the "in" operator instead of "equal to" in the filter definition.

Relevant Documentation:
https://toolset.com/documentation/user-guides/filtering-views-by-custom-fields/

100% of people find this useful.

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.

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 stephanW-2 6 years, 5 months ago.

Assisted by: Christian Cox.

Author
Posts
#1080311

For my homepage I created a view. To show the correct posts I used a query filter and search for the posts that I would like to show. How can I add multiple search variables. For example amsterdam AND barcelona AND brussel, etc.

Is there an operator to use multiple values in the search query?

#1080686
Screen Shot 2018-08-12 at 1.36.01 PM.png

Hi, if you're talking about a custom field filter, then you can use the "in" operator in the filter instead of "equal to". Please see the attached screenshot.
https://toolset.com/documentation/user-guides/filtering-views-by-custom-fields/

#1085892

Thanks for your help!