我正在索引中使用下面的查询。php文件作为主查询,每当我尝试转到第二页时,我都会遇到404错误,我尝试使用posts\\u per\\u页面,但没有效果。
<?php
$args = array(
\'post_type\' => array( \'post\', \'videos\', \'music\' ),
\'tax_query\' => array(
array(
\'taxonomy\' => \'content\',
\'field\' => \'slug\',
\'terms\' => \'indy\',
\'operator\' => \'NOT IN\'
)
)
);
$products = new WP_Query( $args );
if( $products->have_posts() ) {
while( $products->have_posts() ) {
$products->the_post();
?>
Do stuff here.
<?php }
}
else {
echo \'Oh boy, no posts available\';
} ?>
我错过了什么?