title: Wordpress Query does not display all posts using get_posts()
body: <p>I took over managing a WP site and do not have nearly the expertise that the previous person had. On the specific page, we have a magazine that shows related chess games that can be viewed that would fall under the magazine.<img src="https://i.stack.imgur.com/sgjtF.png" alt="enter image description here" /></p>
  <p>For some reason, the page will only display a maximum of 5 games at a time. I need to display as many games as there are that have the tag that matches the magazine. Below is the PHP code used for this page. Is anyone able to help me figure out what/where the issue lies?</p>
  <pre><code>&lt;?php 
  /**
  * Template Name: Antics Magazine Template
  *
  * @package WordPress
  */
  get_header(); ?&gt;
  &lt;main&gt;
      &lt;?php if ( have_posts() ) :
                          while ( have_posts() ) : the_post();
                  ?&gt;
      &lt;section class=&quot;container py-5 text-center&quot;&gt;
          &lt;h2 class=&quot;title--main text-uppercase mb-3&quot;&gt;Antics &lt;strong&gt;Magazine&lt;/strong&gt;&lt;/h2&gt;
          &lt;?php the_content(); ?&gt;
      &lt;?php endwhile; endif; ?&gt;
      &lt;/section&gt;        
      &lt;section class=&quot;container pb-5&quot;&gt;
          &lt;?php 
          $terms = get_terms( array(
                      'taxonomy' =&gt; 'magazine_type',
                      'hide_empty' =&gt; true,
                      'orderby'  =&gt; 'id',
                      'order'    =&gt; 'DESC'
                  ) );
          $i = 1; 
          //print_r($terms);
          foreach($terms as $term){
              //echo $term-&gt;term_id;
              //echo $term-&gt;name;
              //echo $term-&gt;slug;
              if($i === 1 ){ $expand = 'true'; } else{ $expand = 'false'; }
          ?&gt;
          &lt;div class=&quot;events&quot;&gt;
              &lt;div class=&quot;events--header&quot;&gt;
                 &lt;?php echo $term-&gt;name; ?&gt;
                  &lt;a href=&quot;&lt;?php echo get_field('magazine_file', $term); ?&gt;&quot; class=&quot;btn btn--main__light ml-auto&quot; target=&quot;_blank&quot;&gt;Read Magazine&lt;/a&gt;
                  &lt;button class=&quot;btn ml-3&quot; type=&quot;button&quot; data-toggle=&quot;collapse&quot; data-target=&quot;#collapsible-&lt;?php echo $i; ?&gt;&quot; aria-expanded=&quot;&lt;?php echo $expand; ?&gt;&quot;&gt;
                      &lt;span class=&quot;sr-only&quot;&gt;+&lt;/span&gt;
                  &lt;/button&gt;
              &lt;/div&gt;
              &lt;div class=&quot;collapse &lt;?php if($i == 1){ echo 'show'; } ?&gt;&quot; id=&quot;collapsible-&lt;?php echo $i; ?&gt;&quot;&gt;
                  &lt;div class=&quot;events--body&quot;&gt;
                      
                      &lt;?php 
                          $args = array(
                                  'post_type' =&gt; 'magazines',
                                  'tax_query' =&gt; array(
                                      array(
                                          'taxonomy' =&gt; 'magazine_type',
                                          'field'    =&gt; 'slug',
                                          'terms'    =&gt; $term-&gt;slug,
                                      ),
                                  ),
                              );
                          $query = new WP_Query( $args );
                      if( $query-&gt;have_posts()): while( $query-&gt;have_posts()): $query-&gt;the_post();
                      ?&gt;
                      &lt;div class=&quot;events--content&quot;&gt;
                          &lt;div class=&quot;row align-items-center&quot;&gt;
                              &lt;?php /*
                              &lt;div class=&quot;col-xl-4&quot;&gt;
                                  &lt;div class=&quot;events--date mb-xl-0&quot;&gt;
                                      &lt;?php  $date=date_create(get_the_date()); ?&gt;
  
                                          &lt;span&gt;&lt;?php echo date_format($date,&quot;d&quot;); ?&gt;&lt;/span&gt; &lt;?php echo date_format($date,&quot;l, F j, Y&quot;); ?&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                              */ ?&gt;
                              &lt;div class=&quot;col-md&quot;&gt;
                                  &lt;div class=&quot;events--title mb-0&quot;&gt;
                                      &lt;?php the_title(); ?&gt;
                                  &lt;/div&gt;
                                  &lt;!-- &lt;p class=&quot;mb-md-0&quot;&gt;Dothan Open&lt;/p&gt; --&gt;
                              &lt;/div&gt;
                              &lt;div class=&quot;col-md-auto&quot;&gt;
                                  &lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot; class=&quot;btn btn--main__dark&quot;&gt;View Game&lt;/a&gt;
                                  &lt;!-- &lt;a href=&quot;#&quot; class=&quot;btn btn--main__dark&quot;&gt;Download Game&lt;/a&gt; --&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt; 
                      &lt;?php endwhile; endif; ?&gt;
                      
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          
        
          &lt;?php $i++; } ?&gt;
          
          
      &lt;/section&gt;
  &lt;/main&gt;
  
  &lt;script src=&quot;https://code.jquery.com/jquery-3.5.1.slim.min.js&quot; integrity=&quot;redacted&quot; crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;
  &lt;?php 
  get_footer();
  </code></pre>
  <p>I have tried messing with the loop counter thinking that perhaps the loop has a ceiling of 5, but that doesn't seem to be the case. I have verified that all six of the chess games are tagged appropriately/identically to one another.</p>