If you read http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters in detail it outlines everything you need. Take a look at the following code sample taken from the codex. It should help you 🙂
$args = array(
'post_type' => 'Article', /* This is where you should put your Post Type */
'tax_query' => array(
array(
'taxonomy' => 'people',
'field' => 'slug',
'terms' => 'bob'
)
)
);
$query = new WP_Query( $args );
Please note that this query does NOT account for paginated data.
Related Posts:
- How do I query a custom post type with a custom taxonomy?
- how to group custom post type posts by custom taxonomy terms
- Posts per Page on custom Taxonomy Template
- How to get the parent’s taxonomy?
- Query posts by custom post type and custom taxonomy
- How to get only one category of custom post type?
- pre get posts changing the query
- Query for posts in 2 taxonomies
- ‘category__and’ for custom taxonomy?
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- How to dynamically build a multiple taxonomy query loop within a post type’s single loop?
- List custom post type by custom tax term as page title
- How to query custom post types posts filtered by multiple custom taxonomies through a form selection
- Query/list all terms and their custom post count
- Archive for custom taxonomy lists all posts instead of current taxonomy
- How to use custom taxonomies to reference complex relationships?
- Query Custom posts of same taxonomy as the post itself
- Conditional Query of Custom Post Type and custom taxonomy
- Show a Category X’s custom post type on Category X archive page?
- How to edit this code to get the categories in achieve page?
- Listing all term items alphabetically / sorting loop
- How to display Related Posts based on number of taxonomy terms matched
- How to make WP_Query not to show irrelevant posts?
- Custom query – get_the_terms not work
- Control content before and after custom post type loop
- Custom post type, custom taxonomy, query posts only from taxonomy (children of)
- Display custom posts randomly in custom taxonomy archive
- Not able to export large no. of posts in csv
- attach CPT data to a taxonomy
- Targeting custom post type via functions.php doesn’t work
- List all posts in taxonomy term
- Query Multiple Custom Post Types & Exclude a Taxonomy Term
- Sorting the Loop by Taxonomy Value
- custom post type and a “sticky” position taxonomy
- Posts per Page on custom Taxonomy Template
- Getting Custom Posts with Custom Taxonomy
- WordPress custom post type
- Display 2nd category, only once, as sub-heading, in the loop
- Advanced Custom Fields: query posts filtered by multiple field values
- Inserting two categories
- Custom Post Type Pagination Paginates Only in URL Structure
- Set post terms for multiple posts
- Load Custom_post_type categories post with ajax
- Custom Permalink Structure for Custom Post Type, Custom Taxonomy, Under a page
- Custom taxonomy returns 404
- Get terms that contain posts that in turn belong to other terms?
- WP-API select custom taxonomy when creating a post
- Best method to make posts searchable, sortable and filterable – custom field, tag or category?
- First custom field value (out of several) displayed twice after query
- Custom post with more than one custom taxonomy
- How to get custom posts sub category link
- Custom while loop for hierarchical display of a taxonomy
- Terms showing up in object cache on unrelated pages
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)
- Get the taxonomy of a post hierarchically
- Query posts based on the meta key values of logged-in users?
- Adding custom taxonomy in same menu place with two custom post types
- How to make custom taxonomy into drop down select in a custom metabox
- Including taxonomy term before post type breaks top level pages
- Correct procedure for advanced permalinks
- Permalinks: custom post type -> custom taxonomy -> post
- List Taxonomy Terms based on another Taxonomy
- How to get the intersection of two terms both from different custom taxonomies
- CPT’s with landing page instead of archive – Url Rewrite?
- Template for all categories of a custom post type?
- How to change permalink to include custom post type
- Add Custom Post Type of specific Custom Taxonomy to regularly blog loop
- posttype/taxonomy/term archive page 404 error
- How to add attributes to taxonomies that may be different from post to post?
- Display taxonomy terms, child terms and posts in a template
- Custom post type, permalinks, taxonomies and blog posts
- How to group posts and get a mixed posts and groups view?
- Custom post type permalink tag 404
- How to make front end form only accept certain values
- How to get list of taxonomy slugs ordered parents>childs?
- Custom Post Type by Taxonomy
- Deleting taxonomy terms and relationships on a custom post_type when a user is deleted
- Custom post type / taxonomy rewrite archive page 2 gives 404
- Use custom walker to add taxonomy terms to main nav menu
- Post format alternative?
- WP_Query orderby and tax_query
- Permalink structure with custom taxonomies and custom post type like /parent-tax/child-tax/custom-post-type-name (with no base name)
- browse by category and tags?
- permalink /category/post-name with custom post type and taxonomy
- Limit the post for differents custom post type in the same wp_query
- Taxonomy structure help
- Querying Custom Post Type, ordering by Custom Taxonomy Pagination Not Working
- I am trying to hide a custom post type category to logged in users with Pre_Get_Posts
- Custom Taxonomy not being saved on custom posttype
- Different Ways to Query Custom Post Types?
- Create more category hierarchical depth for custom post type/taxonomy plugin (widget)
- Displaying Custom Taxonomies From Multiple Custom Post Types
- Hierarchial Custom Post Types/Taxonomies
- Custom post type and taxonomy permalinks
- How do I share categories across multiple post types?
- Exclude custom taxonomy term posts from custom post loop
- Hierarchical permalinks for custom post type and taxonomy
- Migrating a taxonomy’s tags to the native category
- Add term to custom post type on draft