Skip Navigation

[Resolved] Filter as AND condition not OR

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

Last updated by Christian Cox 4 years, 2 months ago.

Assisted by: Christian Cox.

Author
Posts
#1506973

Tell us what you are trying to do?
I am trying to filter search results using AND not OR condition.
Is there any documentation that you are following?
https://toolset.com/documentation/user-guides/views/front-page-filters/
Is there a similar example that we can see?
For example I will have "Appartment" type and I want to be able to display appartments that have "bedroom" and "bathroom" as features, not "bedroom" or "bathrom". I am working with Blocks.
What is the link to your site?
hidden link

#1507603

Hi, it turns out there isn't a built-in way to handle this in the Blocks Editor when building a View. The two alternatives are:
- Use custom code with the Views API wpv_filter_query to manipulate the WP Query parameters
- Use the classic Views builder to customize the Query Filter AND/OR settings

Would you like more information about either of these options?

#1509235

I definitly do not want to get back to not using Blocks. How could I manage that with Blocks?
Will this be fixed in the next update? Perphaps I could just wait.

This seems as so basic functionality, I still cannot believe it is missing.

#1510371

I will close this for now and try to deal with it my way 🙂

#1511555

Closing per user comments.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.