Title: Taxonomy &amp; WP_Query issue
Last modified: August 30, 2016

---

# Taxonomy & WP_Query issue

 *  [test3be](https://wordpress.org/support/users/test3be/)
 * (@test3be)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/taxonomy-wp_query-issue/)
 * Hi guys,
 * I’m stuck on an issue. I have a custom post type called “mediaroom”. I have created
   a custom taxonomy called “mediaroomcategory”. It has two slugs: “news” and “press-
   release”.
    I have tagged as “news” some entires in “mediaroom”.
 *     ```
       The following query returns correctly the "mediaroom" entries:
       $q = new WP_Query( 'post_type=mediaroom');
   
       This one doesn't work:
       $q = new WP_Query( 'post_type=mediaroom&mediaroomcategory=news');
       ```
   
 * The custom post type and taxonomies have been created using Pods…
 * Thanks for your help
 * Ben

Viewing 1 replies (of 1 total)

 *  [wpfan1000](https://wordpress.org/support/users/wpfan1000/)
 * (@wpfan1000)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/taxonomy-wp_query-issue/#post-6460710)
 * Hey Ben,
 * Please see
    [http://stackoverflow.com/questions/2376348/difference-between-and-in-php](http://stackoverflow.com/questions/2376348/difference-between-and-in-php)
 * You would need to use && not &.
 * BUT this may still not work. I would try args:
 * Example from
    [https://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters](https://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters)
 *     ```
       $args = array(
       	'post_type' => 'post',
       	'tax_query' => array(
       		array(
       			'taxonomy' => 'people',
       			'field'    => 'slug',
       			'terms'    => 'bob',
       		),
       	),
       );
       $query = new WP_Query( $args );
       ```
   
 * Hope this helps 🙂

Viewing 1 replies (of 1 total)

The topic ‘Taxonomy & WP_Query issue’ is closed to new replies.

## Tags

 * [query](https://wordpress.org/support/topic-tag/query/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [wpfan1000](https://wordpress.org/support/users/wpfan1000/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/taxonomy-wp_query-issue/#post-6460710)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
