title: WP-PageNavi not working properly on custom page
body: <p>I have created a custom page that will display posts only from a specific category and i have also set <code>wordpress</code> to show only 4 number of post. Now the problem is that <code>WP-PageNavi</code> is not working properly. Here is the code.</p>
  
  <pre><code>&lt;div class="sixteen columns latest_post"&gt;
  
  &lt;?php query_posts('cat=3', 'posts_per_page=-1=-'); if(have_posts()) : while(have_posts()) :the_post(); ?&gt;
     &lt;div class="sixteen columns alpha omega outer_box"&gt;
         &lt;div class="inner_box articles"&gt;
  
             &lt;!--TITLE OF THE POST --&gt;
             &lt;h3 class="post-title"&gt;&lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark" title="Permanent Link to &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h3&gt;
  
  
  
             &lt;ul class="data"&gt;
               &lt;li&gt;&lt;?php the_author_posts_link() ?&gt; /&lt;/li&gt;
               &lt;li&gt;&lt;?php the_category(', ') ?&gt; /&lt;/li&gt;
               &lt;li&gt;&lt;?php the_time('F jS, Y') ?&gt; /&lt;/li&gt;
               &lt;li&gt;&lt;?php comments_number() ?&gt;&lt;/li&gt;
             &lt;/ul&gt;
  
             &lt;hr&gt;
  
             &lt;!--THUMBNAIL --&gt;
             &lt;div class="align_thumbnail_right"&gt;
                &lt;?php if ( has_post_thumbnail()) the_post_thumbnail('home-thumb'); ?&gt;
  
             &lt;/div&gt;
  
             &lt;div class="content"&gt;
                &lt;!--TEXT --&gt;
                &lt;?php the_excerpt(); ?&gt;
  
  
               &lt;a href="&lt;?php echo get_permalink(); ?&gt;"&gt;&lt;span&gt;Read More&lt;/span&gt;&lt;/a&gt;
             &lt;/div&gt;
  
          &lt;/div&gt;
  
     &lt;/div&gt;
  
  &lt;?php endwhile; endif; wp_reset_query();?&gt;
  
  &lt;!--PAGINATION --&gt;
  
  &lt;div class="pagination"&gt;
  &lt;?php wp_pagenavi(); ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I applied the plugin on the index page and it seems to be working fine. But when i tried it on a custom page it doesn't work.</p>