title: Pagination redirects to home page
body: <p>Hi I'm using pagenavi plugin, the problem is that when i click on page 2 or other pages in pagination, it redirects to my homepage, pagination is also working on home page,(a static front page). However, the wordpress pagination on archieve pages is working fine. Can anybody help me in this please...</p>
  
  <pre><code>&lt;ul class="product-items"&gt;
      &lt;?php
  $paged = (get_query_var('pages')) ? get_query_var('pages') : 1;
  
   $args = array(
      'post_type'=&gt;'product',
     'posts_per_page' =&gt; 12,
     'paged' =&gt; $paged
  ); 
  
  $product_query = new WP_Query($args);
  
  while($product_query-&gt;have_posts()):$product_query-&gt;the_post(); 
   $id = get_the_ID();
  
  ?&gt;
  
  
          &lt;li&gt;
                  &lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;
                  &lt;span class="product-img"&gt;&lt;?php echo get_the_post_thumbnail($id, array(300,150,true)) ?&gt;&lt;/span&gt;
                  &lt;span class="product-detail"&gt;&lt;?php $title=get_the_title(); echo $trimed=wp_trim_words($title,3) ?&gt;&lt;/span&gt;
          &lt;/a&gt;
              &lt;/li&gt;
              &lt;?php endwhile;   if(function_exists('wp_pagenavi')) { wp_pagenavi( array('query' =&gt; $product_query)); }
  
  wp_reset_postdata(); wp_reset_query()?&gt;
      &lt;/ul&gt;
  </code></pre>