Prime策略页面Navi wordpress在archive.php中不起作用

The below plugin works beautifully on every archive_{post-type}.php that I have, but it doesn't work in archive.php (which loads all posts). I don't understand the reason for this.

archive.php:

<?php /* Template Name: Archives */
 get_header(); ?>

 <div class="head-style col-md-12 col-sm-12 col-xs-12">

    <div class="title-pack col-md-12 col-sm-12 col-xs-12">
        <span class="line visible-sm-block"></span>
        <span class="visible-sm-block tittle-style">آخرین اخبار</span>
    </div>
    <div class="row news-content">
        <div class="last-news-box col-md-9 col-sm-8 col-xs-12">
            <?php $args = array( 'post_type' => 'post'); 
                $loop = new WP_Query( $args );
                while ( $loop->have_posts() ) : $loop->the_post();?>

                    <div class="col-md-11 col-sm-11 col-xs-12">
                        <div class="image-news col-md-4 col-sm-4 col-xs-12">
                            <?php the_post_thumbnail(); ?>
                        </div>
                        <div class="newstext col-md-8 col-sm-8 col-xs-12">
                            <div>
                                <h3><?php the_title(); ?></h3>
                                <p><?php the_excerpt(); ?>...</p>

                                <a href="<?php the_permalink(); ?>">
                                    <button class="readmore-button">ادامه مطلب</button>
                                </a>
                            </div>  
                        </div>
                    </div>
                <?php endwhile ?>               
        </div>

    </div>

<div><?php if ( function_exists( 'page_navi' ) ) { page_navi(); } ?></div>  
<?php get_footer(); ?>

When debugging this, the if condition line is never reached. In my setup there are more than 10 posts and I have set posts_per_page=5.

What else am I missing?

Can you please try below code:

<?php /* Template Name: Archives */
 get_header(); ?>

 <div class="head-style col-md-12 col-sm-12 col-xs-12">

    <div class="title-pack col-md-12 col-sm-12 col-xs-12">
        <span class="line visible-sm-block"></span>
        <span class="visible-sm-block tittle-style">آخرین اخبار</span>
    </div>
    <div class="row news-content">
        <div class="last-news-box col-md-9 col-sm-8 col-xs-12">
            <?php 
                if ( get_query_var('paged') ) {
                    $paged = get_query_var('paged');
                } elseif ( get_query_var('page') ) { // 'page' is used instead of 'paged' on Static Front Page
                    $paged = get_query_var('page');
                } else {
                    $paged = 1;
                }
                $args = array( 'post_type' => 'post', 'paged' => $paged); 
                $loop = new WP_Query( $args );
                while ( $loop->have_posts() ) : $loop->the_post();?>

                    <div class="col-md-11 col-sm-11 col-xs-12">
                        <div class="image-news col-md-4 col-sm-4 col-xs-12">
                            <?php the_post_thumbnail(); ?>
                        </div>
                        <div class="newstext col-md-8 col-sm-8 col-xs-12">
                            <div>
                                <h3><?php the_title(); ?></h3>
                                <p><?php the_excerpt(); ?>...</p>

                                <a href="<?php the_permalink(); ?>">
                                    <button class="readmore-button">ادامه مطلب</button>
                                </a>
                            </div>  
                        </div>
                    </div>
                <?php endwhile ?>               
        </div>

    </div>

<div><?php if ( function_exists( 'page_navi' ) ) { page_navi(); } ?></div>  
<?php get_footer(); ?>