排除wp_query和输出20中的某些标记


exclude certain tags in wp_query and output 20

这段代码有什么问题:

<?php $the_query = new WP_Query( array( 'tag__not_in' => array( 8,9,10 ) ), 'posts_per_page' => 20 ); ?>

我试了又试,但我不能让它工作

Posts per page在数组之外,实际上被用作WP_Query的第二个参数。

改变:

<?php $the_query = new WP_Query( array( 'tag__not_in' => array( 8,9,10 ) ), 'posts_per_page' => 20 ); ?>

:

<?php $the_query = new WP_Query( array( 'tag__not_in' => array( 8,9,10 ), 'posts_per_page' => 20 ) ); ?>