title: How do I loop posts for a custom category for a custom post type in WordPress?
body: <p>The code I have below loops all posts within one of my custom post types.
   I need to loop for a specific category within the custom post type.</p>
  
  <pre><code>&lt;?php 
      $query = new WP_Query( array( 'post_type' =&gt; 'case-study' ) ); 
      if ( $query-&gt;have_posts() ) : 
          while ( $query-&gt;have_posts() ) : $query-&gt;the_post(); 
  
              get_template_part( 'template-parts/content', 'work' ); 
  
           endwhile;
      endif; 
  ?&gt;
  </code></pre>
  
  <p>What do I need to change for it it loop a specified category within the custom post type?</p>