我有一个自定义帖子存档的循环,但第二页显示的帖子与第一页完全相同。
<div class="row">
<div class="col-md-8 col-md-offset-2">
<?php
$args = array(
\'posts_per_page\' => 3,
\'post_type\' => \'work\'
);
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ):
while ( $the_query->have_posts() ) : $the_query->the_post(); // run the loop
get_template_part( \'template-parts/content-work\', get_post_format() );
endwhile;
endif;?>
</div>
</div>
<div class="marg--bottom-l text--center">
<?php
$GLOBALS[\'wp_query\']->max_num_pages = $the_query->max_num_pages;
the_posts_pagination();
wp_reset_query();
?>
</div>
你知道有什么问题吗?谢谢