使用WordPress v4。6、我为get_posts()
基于价格(2个条件)、sku和以下类别:
[meta_query] => Array
(
[relation] => AND
[0] => Array
(
[key] => _price
[value] => Array
(
[0] => 0
[1] => 5
)
[type] => DECIMAL
[compare] => BETWEEN
)
[1] => Array
(
[key] => _price
[value] => Array
(
[0] => 50.01
[1] => 100
)
[type] => DECIMAL
[compare] => BETWEEN
)
[2] => Array
(
[key] => _sku
[value] => batte
[compare] => like
)
)
[tax_query] => Array
(
[0] => Array
(
[taxonomy] => product_cat
[field] => id
[terms] => Array
(
[0] => 26
[1] => 20
)
)
)
我设置
AND
关系,但实际上我需要
OR
2价格与
AND
其他比较的关系。
此查询的正确语法是什么?