admin管理员组文章数量:1328034
I'm trying to add an AND
condition to my WP_Query()
parameters.
The below query works perfectly and returns all the posts:
$options = array(
'post_type' => 'available_units',
'post_status' => 'publish',
'meta_query' => array(
'key' => 'reservation_status',
'value' => 'Reserved',
'!='
)
);
However, this one doesn't:
$options = array(
'post_type' => 'available_units',
'post_status' => 'publish',
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'reservation_status',
'value' => 'Available',
'!='
),
array(
'key' => 'reservation_request_date',
'value' => '2020-07',
'LIKE'
)
)
);
I've searched for a lot of references online but it seems that my meta_query() snippet is correct. I don't understand why it's not returning and data.
本文标签: wp queryMultiple metaquery not returning rows
版权声明:本文标题:wp query - Multiple meta_query not returning rows 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742240022a2438771.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论