title: Wordpress Custom post page with pagination
body: <p>I have custom post types called clients, need to display 5 clients per page with pagination. The page what i have is page-clients.php</p>
  
  <p>I have used the wp_pagenavi plugin.</p>
  
  <p>I get a perfect navigation list 1,2,3 etc etc but on clicking them takes me to page not found</p>
  
  <p>My Code</p>
  
  <pre><code>$args = array(
    'posts_per_page' =&gt; 5,
    'post_type' =&gt; 'clients',
    'paged' =&gt; get_query_var('page')
  
  );
  
  query_posts($args); 
  
  &lt;?php while ( have_posts() ) : the_post(); ?&gt;
  .....
  &lt;?php endwhile; // end of the loop. ?&gt;
  
  &lt;?php wp_pagenavi(); ?&gt; 
  &lt;?php wp_reset_query();?&gt;
  </code></pre>