title: Exclude Wordpress posts from being shown on homepage from a specific category
body: <p>Heres a tricky one...</p>
  
  <p>If a post is marked as 'Category A' I want it to be excluded from the homepage. This can be achieved with the following code:</p>
  
  <pre><code>function exclude_category($query) 
  {
      if ( $query-&gt;is_home() ) 
      {
          $query-&gt;set('cat', '-3804');
      }
      return $query;
  }
  
  add_filter('pre_get_posts', 'exclude_category');
  </code></pre>
  
  <p>BUT if a post is marked as 'Category A' AND 'Category B' I want it to show on the homepage. How can I tweak my code to allow for this?</p>