您可以通过tax_query
, 虽然默认情况下不通过任何URL操作:
$args = array(
\'post_type\' => \'post\',
\'tax_query\' => array(
\'relation\' => \'AND\',
array(
\'taxonomy\' => \'post_tag\',
\'field\' => \'slug\',
\'terms\' => array( \'biology\' )
),
array(
\'taxonomy\' => \'post_tag\',
\'field\' => \'slug\',
\'terms\' => array( \'male\', \'female\' ),
\'operator\' => \'IN\'
)
)
);
$query = new WP_Query( $args );
如果你想通过URL来实现这一点,你必须想出一些方法来传递术语,这样你就可以拦截并创建查询。