您应该使用tax_query
为此。见官方文件here.
尝试以下操作:
$indicaArgs = array(
\'post_type\' => \'product\',
\'productType\' => \'Indica\',
\'locationCity\' => \'Los Angeles\',
\'posts_per_page\' => -1,
\'post_status\' => \'publish\',
\'tax_query\' => array(
\'relation\' => \'AND\',
array(
\'taxonomy\' => \'productType\',
\'field\' => \'slug\',
\'terms\' => \'indica\', // here should be slug
),
array(
\'taxonomy\' => \'locationCity\',
\'field\' => \'slug\',
\'terms\' => \'los-angeles\', // here should be slug
),
),
\'date_query\' => array(
array(
\'year\' => $today["year"],
\'month\' => $today["mon"],
\'day\' => $today["mday"],
),
)
);