I'm trying to include post meta in the scope of a WordPress search using WP_Query.
I have a meta query that looks like this:
$args['meta_query'] = [
'relation' => 'AND',
[
'key' => 'quantity',
'value' => 1,
'compare' => '>='
],
[
'relation' => 'OR'
[
'key' => 'brand',
'value' => 'bar'
],
[
'key' => 'vendor',
'value' => 'biz'
]
]
]
When I add the 's' parameter to the query object, it seems like it's matching posts that have one of the meta query fields "brand" or "vendor", but also matches the description or title.
I want it to match like this: brand OR vendor OR title OR description.
The current semantics seem to be giving me something more like: (brand OR vendor) AND (title OR description)
posts_where
orposts_clauses
.