【发布时间】:2016-04-17 11:22:15
【问题描述】:
嗨,在我的 post_type=shop 中,我有 2 个元键和值数组
自定义字段
Name Values
cu_status pending,processing,completed
cu_date 12-Jan-2016 , 13-Jan-2016, ...... any date in the same format date("d-M-Y")
现在我需要遍历所有带有 cu_status =pending,processing 和 cu_date 在 2016 年 1 月 12 日至 2016 年 4 月 13 日之间的帖子 会查询什么?
我很困惑。为了获得所有状态为待处理的帖子,处理我知道查询
$args = array(
'post_type' => 'shop',
'post_status' => 'publish',
'meta_query' => array(
array(
'key' => 'cu_status',
'value' => array('pending','processing'),
'compare' => 'IN',
)
),
'posts_per_page' => -1
);
请帮助完成查询。
【问题讨论】:
标签: wordpress