这应该可以通过tax_query
parameters for WP_Query
.
查询是针对任何术语NOT EXISTS
, OR
, 对于术语ID为IN
提供的阵列。
\'tax_query\' => array(
\'relation\' => \'OR\',
array(
\'taxonomy\' => \'group\',
\'operator\' => \'NOT EXISTS\',
),
array(
\'taxonomy\' => \'group\',
\'field\' => \'term_id\',
\'terms\' => array( 23, 42 ),
\'operator\' => \'IN\',
),
)