尽管分页转到nieuws/page/2,它仍然显示与第一页相同的帖子。这是我的博客PHP代码:
<!-- Tekst -->
<div class="page-wrapper" id="nieuws">
<h1 id="over-ons-h1">Laatste <span>Nieuws</span></h1>
<div class="lijn" id="text-lijn"></div>
</div>
<!-- Page Code -->
<div class="wrap">
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<!-- Posts Loop -->
<?php
$args = array(
\'post_type\' => \'nutrisense_nieuws\'
);
$the_query = new WP_Query($args);
?>
<?php if ($the_query->have_posts() ): while ($the_query->have_posts() ) :$the_query->the_post(); ?>
<div class="posts">
<h2 class="post-title"><a class="post-title" href="<?php the_permalink(); ?>".><?php the_title(); ?></a></h2>
<div class="calender"><i class="far fa-calendar-alt"></i><p class="post-datum"><?php the_time(\'j F, Y\'); ?></p></div>
<div class="post-thumbnail"><?php the_post_thumbnail(); ?></div>
<div class="post-tekst-wrapper"><p class="post-tekst"><?php the_excerpt(); ?></p></div>
<p class="post-lees-meer"><a class="post-title" href="<?php the_permalink(); ?>".>Lees meer..</a></p>
<?php endwhile;?>
<?php
previous_posts_link(\'« Nieuwere berichten\');
next_posts_link( \'Oudere berichten »\', $the_query->max_num_pages );
wp_reset_postdata();
?>
<?php endif; ?>
</div>
</main><!-- #main -->
</div><!-- #primary -->
</div><!-- .wrap -->