这段代码有什么问题:
<?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 ) ); ?>