wordpress date_query with after数组返回0结果

时间:2018-01-03 10:28:21

标签: php wordpress

请查看我的查询

$args = array(
        'post_type' => 'properties',
        'post_status' => 'publish',
        'date_query' => array(
            array(
                'before' => array(
                    'year' => $ed[0],
                    'month' => $ed[1],
                    'day' => $ed[2],
                ),
                'after' => array(
                    'year' => $st[0],
                    'month' => $st[1],
                    'day' => $st[2],
                ),
                'inclusive' => true,
            ),
        ),
        'orderby' => 'ID',
        'order' => 'DESC',
        'meta_query' => array(array('key' => 'broker_id', 'value' => $broker_ID, 'compare' => '=')),
        'posts_per_page' => -1
    );
$properties = new WP_Query($args);
$propertydata = $properties->posts;

以上查询返回空结果,但如果我删除'之后'从它的数组,它将返回正确的帖子。 请注意,日期数组是正确的。

问题是什么,我无法弄清楚

0 个答案:

没有答案
相关问题