看到了吗WP docs for query_posts.
相关摘录:
The following returns all posts that belong to category 1 and are tagged "apples"
query_posts( \'cat=1&tag=apples\' );
You can search for several tags using +
query_posts( \'cat=1&tag=apples+apples\' );
或者使用您正在使用的阵列版本,如下所示:
$args = array(
\'category__in\' => array(4),
\'posts_per_page\' => 4,
\'tag\' => array(\'Bolivia\', \'Brazil\')
)
query_posts($args);
案例的字符串版本:
query_posts(\'category__in=4&posts_per_page=4&tag=Bolivia,Brazil\');