请添加以下代码
$args = array(
\'post_type\' => \'post\',
\'post_status\' => \'publish\',
\'category__and\' => array( 2, 6 ),
\'posts_per_page\' => 1,
);
$arr_posts = new WP_Query( $args );
或
$tax_query = array(
relation => \'AND\',
array(
\'taxonomy\' => \'category\',
\'field\' => \'term_id\', // \'term_id\' by default, so just here as an example
\'terms\' => 186,
\'include_children\' => false, // true by defualt
\'operator\' => \'IN\' // \'IN\' by default, so just here as an example
),
array(
\'taxonomy\' => \'category\',
\'terms\' => 187,
\'include_children\' => false, // true by defualt
)
()