Title: Taxonomy Query Possible?
Last modified: August 22, 2016

---

# Taxonomy Query Possible?

 *  [AngryGerman](https://wordpress.org/support/users/angrygerman/)
 * (@angrygerman)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/taxonomy-query-possible/)
 * Hi,
 * When running a query using connected_type, connected_items, connected_direction,
   etc., is there a way to narrow down the posts that Posts 2 Posts returned to 
   such posts which are tagged with one or more specific terms from a custom taxonomy?
 * Essentially what I’m looking for is a `tax_query` functionality that applies 
   to the **connected** posts.
 * Something like the following (see the `connected_tax_query`) would be ideal, 
   but I haven’t found a way to achieve this yet:
 *     ```
       $posts = get_posts(array(
         'post_type' => 'post_type_a',
         'connected_type' => 'post_type_b',
         'connected_items' => $list_of_narrowed_down_candidates,
         'connected_direction' => 'to',
         'connected_tax_query => array( etc. ),
         'nopaging' => true,
         'suppress_filters' => false
       ));
       ```
   
 * Is this possible, or what would be the best way to implement this?
 * [https://wordpress.org/plugins/posts-to-posts/](https://wordpress.org/plugins/posts-to-posts/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [AngryGerman](https://wordpress.org/support/users/angrygerman/)
 * (@angrygerman)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/taxonomy-query-possible/#post-5540334)
 * Ah, I believe I found what I was looking for.
 * Is it correct to assume that using `connected_query` with a `tax_query` inside
   of that will do exactly this?
 *  [Julian Fox (greataussiepie)](https://wordpress.org/support/users/greataussiepie/)
 * (@greataussiepie)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/taxonomy-query-possible/#post-5540378)
 * Hi,
 * Did this end up working?
 * I am trying to query a custom meta field value from a connected post type.
 * I have recipes and ingredients CPTs with a p2p connection type recipes_to_ingredients.
   I can successfully query and list all connected ingredients, but i can’t figure
   out how to simply display a meta key/value as well.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Taxonomy Query Possible?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/posts-to-posts_7a8e9d.svg)
 * [Posts 2 Posts](https://wordpress.org/plugins/posts-to-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/posts-to-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/posts-to-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/posts-to-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/posts-to-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/posts-to-posts/reviews/)

## Tags

 * [posts-2-posts](https://wordpress.org/support/topic-tag/posts-2-posts/)
 * [taxonomy](https://wordpress.org/support/topic-tag/taxonomy/)
 * [tax_query](https://wordpress.org/support/topic-tag/tax_query/)

 * 2 replies
 * 2 participants
 * Last reply from: [Julian Fox (greataussiepie)](https://wordpress.org/support/users/greataussiepie/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/taxonomy-query-possible/#post-5540378)
 * Status: not resolved