Custom query and page-navi not working
<p>i am using custom query and wp-page-navi plugin. But when i click on page 1 2 3 its showing content only of first page. How to solve that issue? On archive page its working and categories.</p>

<pre><code>&lt;?php
$current_page = (get_query_var('paged')) ? get_query_var('paged') : 1; // get current page number
$args = array(
'posts_per_page' =&gt; 5, // the value from Settings &gt; Reading by default
'paged'          =&gt; $current_page // current page
);
query_posts( $args );

$wp_query-&gt;is_archive = true;
$wp_query-&gt;is_home = false;

while(have_posts()): the_post();
?&gt;





            &lt;article class="blog-box"&gt;
                &lt;header&gt;
                    &lt;div class="row"&gt;
                        &lt;div class="col-md-1 blog-date"&gt;
                            &lt;span class="blog-day"&gt;&lt;?php the_time('jS') ?&gt; &lt;/span&gt;
                            &lt;span class="blog-month"&gt;&lt;?php the_time('M') ?&gt;&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class="col-md-11"&gt;
                            &lt;h2&gt;&lt;?php the_title() /* post title */ ?&gt;&lt;/h2&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/header&gt;
               &lt;?php the_post_thumbnail('blogImage', array( 'class' =&gt; "img-responsive")); ?&gt;
                &lt;?php my_excerpt(short);?&gt;  
                &lt;a href="&lt;?php echo get_permalink(); ?&gt;" class="more-btn"&gt;more&lt;/a&gt;
            &lt;/article&gt;
            &lt;!-- // blog box  --&gt;
&lt;?php
endwhile;
if( function_exists('wp_pagenavi') ) wp_pagenavi(); // WP-PageNavi function
?&gt;
</code></pre>