title: Not all post displaying in wordpress filter
body: <p>I have a page with a filter that shows posts by category.  It successfully filters. 
  this is the select code:</p>
  
  <pre><code>&lt;select class="selectBox" id="division" name="division"&gt;
    &lt;option value="0"&gt;Topic&lt;/option&gt;
    &lt;option value="Compliance"&gt;Compliance&lt;/option&gt;
    &lt;option value="Intelligence"&gt;Intelligence&lt;/option&gt;
    &lt;option value="Investigations"&gt;Investigations&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>If you click on the topic option and click the submit button, it should return all posts again, but it stops at 10 posts.  </p>
  
  <p>here is the filter code which is in the functions.php file</p>
  
  <pre><code>function ajax_filter_function(){
  $args = array(
      'orderby' =&gt; 'date', // we will sort posts by date
      'order' =&gt; 'DESC',
      'post_type'=&gt;'post',
      'post_status' =&gt; 'publish'
  
  );
  
  // for categories
  if(!empty( $_POST['division'] ) &amp;&amp; !empty($_POST['type']) ) {
      $args['tax_query'] = array(
          array(
              'taxonomy' =&gt; 'category',
              'field' =&gt; 'slug',
              'post_status' =&gt; 'publish',
              'terms' =&gt; array(strtolower(str_replace(' ','-',$_POST['type'])))
          ),
          array(
              'taxonomy' =&gt; 'category',
              'field' =&gt; 'slug',
              'post_status' =&gt; 'publish',
              'terms' =&gt; array(strtolower(str_replace(' ','-',$_POST['division'])))
          )
      );
  }elseif(!empty( $_POST['division'] )) {
      $args['tax_query'] = array(
          array(
              'taxonomy' =&gt; 'category',
              'field' =&gt; 'slug',
              'post_status' =&gt; 'publish',
              'terms' =&gt; array(strtolower(str_replace(' ','-',$_POST['division'])))
          )
      );
  }elseif(!empty( $_POST['type'] )) {
      $args['tax_query'] = array(
          array(
              'taxonomy' =&gt; 'category',
              'field' =&gt; 'slug',
              'post_status' =&gt; 'publish',
              'terms' =&gt; array(strtolower(str_replace(' ','-',$_POST['type'])))
          )
      );
  }else{
      $args['tax_query'] = array(
          array(
              'taxonomy' =&gt; 'category',
              'field' =&gt; 'slug',
              'post_status' =&gt; 'publish',
              'terms' =&gt; array('resources')
          )
      );
  }
  $query = new WP_Query( $args );
  
  if( $query-&gt;have_posts() ) :
      while( $query-&gt;have_posts() ): $query-&gt;the_post();
          $post_cat = get_post_meta(get_the_ID(), 'primary_category', true);
          echo'&lt;li style="background:url('.get_the_post_thumbnail_url($query-&gt;ID,'full').') no-repeat;background-size:cover;background-position:center;"&gt;
              &lt;a href="'.get_the_permalink().'"&gt;
                  &lt;div class="cat-bar '.strtolower(str_replace(' ','-',$post_cat)).'"&gt;'.ucwords($post_cat).'&lt;/div&gt;';
                  $post_cat = get_post_meta(get_the_ID(), 'primary_category', true);
                  foreach ( (get_the_category() ) as $child ) {
                      if ( $child-&gt;cat_name != $post_cat &amp;&amp; $child-&gt;cat_name != 'Uncategorized' &amp;&amp; $child-&gt;cat_name != 'Thank You Page'){
                          echo'&lt;div class="cat-bar sec-cat filtered-cat"&gt;'.$child-&gt;cat_name.'&lt;/div&gt;';
                      }
                  }
          echo '&lt;div class="title-section"&gt;&lt;div class="title"&gt;'.get_the_title().'&lt;/div&gt;';
          if($post_cat == 'Event') { 
              echo'&lt;div class="date"&gt;&lt;img src="'.get_template_directory_uri().'/img/new/clock.png" /&gt; '.get_field('event_date', get_the_ID()).'&lt;/div&gt;';
          }else{ 
              echo'&lt;div class="date"&gt;&lt;img src="'.get_template_directory_uri().'/img/new/clock.png" /&gt; '.get_the_time('F jS, Y').'&lt;/div&gt;'; 
          }
          echo'
                  &lt;/div&gt;      
              &lt;/a&gt;
              &lt;/li&gt;
          ';
      endwhile;
      wp_reset_postdata();
  else :
      echo '&lt;p style="width:100%;text-align:center;"&gt;Sorry, no resources match that criteria. &lt;a href="/resources"&gt;Remove filters&lt;/a&gt; and try again.&lt;/p&gt;';
  endif;
  
  die();
  </code></pre>
  
  <p>}</p>
  
  <p>add_action('wp_ajax_myfilter', 'ajax_filter_function'); 
  add_action('wp_ajax_nopriv_myfilter', 'ajax_filter_function');</p>
  
  <p>And for reference, <a href="https://tdinternational.com/resources/" rel="nofollow noreferrer">this</a> is the site where it exists.
  You will notice that if you click filter, it removes the last two posts.</p>
  
  <p>help!</p>