Meta Query with AND & OR?

Sorry, doesn’t work that way. The “simple” meta parameters are converted into part of the meta_query as a whole. So it’s not a separate thing, and your OR relation applies to it as well.

Your query thus is not possible with the normal query system, because you want to mix ANDs with ORs (you want items that have event_data ANDed with a bunch of others with ORs between them).

You’ll have to resort to either custom SQL or rethink your design.

Leave a Comment