I'm using the query below in the index.php file as the main query, whenever I try to go to the 2nd page I get a 404 error, I tried using posts_per_page but to no avail.
<?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';
} ?>
What am I missing?