Skip Navigation

AND always used with multiple Views query filters, even if OR is specified


Topic Tags: Views, Views plugin


When multiple search filters or query filters are added to a View, the legacy editor for Views allows you to specify whether the condition for matching multiple filters should use AND or OR. (The option isn’t currently available in the block editor.)

Selecting OR doesn’t work, the generated query always applies AND as the condition for multiple filters.


It would be possible to modify the query generated by Views to force the OR comparison using the API filter wpv_filter_query, with a suitably high priority (e.g. 101).


a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>