title: Filter posts in Wordpress based on conditional parameters
body: <p>The entire front-end, and passing the selected categories from menu to the back-end is working.</p>
  
  <p>Using the parameters (categories id) as filter is not working.</p>
  
  <p>Each item in the table displayed is a category. The results are posts.</p>
  
  <pre><code>// cats brand |  cats type     |  cats can not be
  //----------------------------------------
  //  1 dell    | 15 pc          |  40 broken 
  //  2 ibm     | 16 smartphone  |  41 used 
  //  3 samsung | 17 monitor     |  42 remanufactured
  //  4 hp      | 18 printer     
  </code></pre>
  
  <p>What I need to return is this example working:</p>
  
  <p>-> Posts from categories dell or hp</p>
  
  <p>-> also belonging to category pc or monitor</p>
  
  <p>-> are not in broken category</p>
  
  <pre><code>$args = array(                   
     'category_name' =&gt; 'dell,hp',
     'category__in' =&gt; '15,17', 
     'category__not_in' =&gt; '40' 
      );
      $query = new WP_Query( $args );
  ?&gt;
  
  &lt;?php if( $query-&gt;have_posts() ) : while( $query-&gt;have_posts() ) : $query-&gt;the_post();  
      echo "--------------------&lt;br&gt;";
      echo "&lt;br&gt;" . the_title();
      echo "&lt;br&gt;" . the_category();
      endwhile; 
            else:
          ?&gt;
          &lt;p&gt;no results found.&lt;/p&gt;
          &lt;?php
          endif; 
          wp_reset_postdata();
  ?&gt;
  </code></pre>