I have custom post type with some ACF fields. I use ACF for extra properties of entity, and I use native wordpress taxonomies too for base category of entity. So I need to build query with meta_query and tax_query same time. It looks like:
WP_Query {
"meta_query" => {
"relation" => "OR",
[
"key" => "rating",
"compare" => "LIKE",
"value" => "AA"
]
},
"tax_query" => {
"relation" => "OR",
[
"taxonomy" =>"currencies",
"field" =>"slug",
"terms" => [
"eur",
"usd"
],
"operator" => "IN"
]
}
}
If I searching only by taxonomies or only by meta-fields, all works fine. But how searching by taxonomies OR by meta-fields (by default, Wordpress use AND relation, i.e. post will finded only if all sub-queries will return true)? I.e. I need add relation between two type of queries in main WP_Query object.
Any suggestions?