从今天开始获取所有帖子,这些帖子类型为“product”,在“productType”分类法中为“Indica”,在“locationCity”分类法中为“Los Angeles”——然而,我获取的帖子“all”与自定义分类法的查询参数无关。
// args
$today = getdate();
$indicaArgs = array(
\'post_type\' => \'product\',
\'productType\' => \'Indica\',
\'locationCity\' => \'Los Angeles\',
\'posts_per_page\' => -1,
\'post_status\' => \'publish\',
\'date_query\' => array(
array(
\'year\' => $today["year"],
\'month\' => $today["mon"],
\'day\' => $today["mday"],
),
)
);
// The Query
$query1 = new WP_Query($indicaArgs);