[Resolved] Filter as AND condition not OR

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.

This topic contains 4 replies, has 2 voices.

Last updated by Christian Cox 3 days, 17 hours ago.

Assigned support staff: 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

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

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

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

Closing per user comments.