title: Wordpress Pagination on Custom Page not working
body: <p>I have made a custom post-type-page (page-portfolio.php) within the standard-Loop/Query and a second loop for the Custom-Post-Types. On this CPT-Page I would like to show a pagination. Therefore I'm using wp_bootstrap_pagination from here: <a href="https://github.com/talentedaamer/Bootstrap-wordpress-pagination" rel="nofollow">github</a></p>
  
  <p>On my regular Archive Pages, the navigation works, but only there. What is wrong? Is there any problem because of the two loops/querys?</p>
  
  <pre><code>     &lt;?php
  /**
   * Template Name: Portfolio
   * The template for displaying portfolio posts.
   *
   * @package Theme Name
   */
  
  get_header(); ?&gt;
  &lt;div id="content" class="site-content"&gt;
      &lt;div id="primary" class="content-area"&gt;
          &lt;main id="main" class="site-main" role="main"&gt;
  
                  &lt;?php while ( have_posts() ) : the_post(); ?&gt;
  
                          &lt;?php get_template_part( 'content', 'page' ); ?&gt;
  
                          &lt;?php if ( comments_open() || get_comments_number() ) : ?&gt;
                                  &lt;section class="section-gradient"&gt;
                                      &lt;div class="container"&gt;
                                          comments_template();
                                      &lt;/div&gt;&lt;!-- .container --&gt;
                                  &lt;/section&gt;
                          &lt;?php endif; ?&gt;
  
                  &lt;?php endwhile; // end of the loop. ?&gt;
                  &lt;?php wp_reset_postdata(); ?&gt;
  
          &lt;section class="section-gradient"&gt;
              &lt;div class="container"&gt;
                  &lt;div class="row"&gt;
                      &lt;?php
                      $paged = ( get_query_var('page') ) ? get_query_var('page') : 1;
                      $args = array( 'post_type' =&gt; 'portfolio', 'paged' =&gt; $paged, 'posts_per_page' =&gt; 3 );
                      $loop = new WP_Query( $args );
                      while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post(); ?&gt;
  
                          &lt;?php get_template_part( 'content', 'portfolio' ); ?&gt;
  
                          &lt;?php if ( comments_open() || get_comments_number() ) : ?&gt;
                                  &lt;section class="section-gradient"&gt;
                                      &lt;div class="container"&gt;
                                          comments_template();
                                      &lt;/div&gt;&lt;!-- .container --&gt;
                                  &lt;/section&gt;
                          &lt;?php endif; ?&gt;
  
                      &lt;?php endwhile; // end of the loop. ?&gt;
                      &lt;?php wp_reset_postdata(); ?&gt;
                  &lt;/div&gt;&lt;!-- .row --&gt;
              &lt;/div&gt;
          &lt;/section&gt;
          &lt;section class="section-lightdark"&gt;
              &lt;div class="container"&gt;
              &lt;?php
                if ( function_exists('wp_bootstrap_pagination') )
                  wp_bootstrap_pagination();
              ?&gt;
              &lt;/div&gt;
          &lt;/section&gt;
      &lt;/main&gt;&lt;!-- #main --&gt;
  &lt;/div&gt;&lt;!-- #primary --&gt;
  </code></pre>