title: Custom Post and Pagination in WordPress
body: <p>I know there is plenty of information out there on pagination and custom post types, but after doing the research and trying a few different methods, I'm just not having any luck. </p>
  
  <p>Would greatly appreciate any thoughts of why the code below isn't working:</p>
  
  <pre><code>&lt;!-- main content --&gt;
  &lt;main class="main-content"&gt;
  
    &lt;h1&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;
  
    &lt;div class="projects"&gt;
  
      &lt;?php
        $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  
        $args = array(
        'numberposts' =&gt; -1,
        'post_type' =&gt; 'projects',
        'meta_key' =&gt; 'project-status',
        'meta_value' =&gt; 'Completed Project',
        'paged' =&gt; $paged,
        'showposts' =&gt; 3
        );
  
        $project = new WP_Query( $args );
      ?&gt;
  
      &lt;?php
        if ( $project-&gt;have_posts() ) :
        while ( $project-&gt;have_posts() ) : $project-&gt;the_post();
      ?&gt;
  
          &lt;?php get_template_part('content-project'); ?&gt;
  
        &lt;?php endwhile; ?&gt;
  
      &lt;?php
        wp_pagenavi();
        wp_reset_postdata();
      ?&gt;
  
      &lt;?php endif; ?&gt;
  
  &lt;/div&gt;
  
  &lt;/main&gt; 
  </code></pre>