title: Why can't you filter a custom post type by a category name?
body: <p>The category slug exists and is assigned to many posts.
  Removing the category_name from the args then shows all the custom posts.
  What is the correct way for filtering the posts by category name?</p>
  <pre><code>   &lt;?php
  
     $args = array(
         'post_type'       =&gt; 'Resource',
         'category_name' =&gt; 'activity-sheets'
     );
  
  
     $loop = new WP_Query($args);
  
  while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post();
  ?&gt; 
  </code></pre>