新wordpress模板的分页问题

The sites blog here

The pagination at the bottom of the blog page does not change content to page 2 posts when page 2 is pressed despite the corresponding page 2 URL appearing in the address bar - also, page 2 button does not show as selected when address bar shows page 2 -

I have used this theme before on this website and the pagination issue was there too on install but sorted by the creator who is uncontactable now -

It seems every fresh install of this theme has the pagination issue until something is edited -

Just to add that I'm not sure which code to post snippets of so if that would help please let me know which files but in case this is the correct code here is the snippet from template-blog.php

<?php
if(is_category() || is_archive()){
    /*get page with blog template set*/
    $post_template_page_array = get_pages(array(
        'post_type' => 'page',
        'post_status' => 'publish',
        'number' => 1,
        'meta_key' => '_wp_page_template',
        'meta_value' => 'template-blog.php',
        'sort_order' => 'ASC',
        'sort_column' => 'menu_order',
    ));
    $post_template_page = $post_template_page_array[0];

    echo wpb_js_remove_wpautop(apply_filters('the_content', $post_template_page->post_content));
    global $post;
    $post = $post_template_page;
    setup_postdata($post);
} else {
    if(have_posts()) : while (have_posts()) : the_post();
        the_content();
    endwhile; endif;
}
?>

many thanks in advance for anyone who can suggest a solution for this :)

Pagination in wordpress:

Sample pagination code:

<?php if ( have_posts() ) : ?>

<!-- Add the pagination functions here. -->

<!-- Start of the main loop. -->
<?php while ( have_posts() ) : the_post();  ?>

 <!-- the rest of your theme's main loop -->

 <?php endwhile; ?>
 <!-- End of the main loop -->

 <!-- Add the pagination functions here. -->

  <div class="nav-previous alignleft"><?php next_posts_link( 'Older posts' ); ?></div>
 <div class="nav-next alignright"><?php previous_posts_link( 'Newer posts' ); ?></div>

<?php else : ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>

For more Reference: URL