The arguments for your query would be like:
$args = array(
'post_type' => 'articles',
'tax_query' => array(
array(
'taxonomy' => 'category',
'field' => 'name',
'terms' => 'news',
),
),
);
$loop = new WP_Query( $args );
if ( $loop->have_posts() ) :
while ( $loop->have_posts() ) : $loop->the_post();
endwhile;
endif;
Related Posts:
- Querying Term Posts in Loop
- WP_Query by a category id and a custom post_type
- Exclude a category from WP_Query
- How to use a custom post type as front page?
- WP_Query ignores post_type in category view
- category__in not working on custom post type
- List with categories, subcategories and posts of custom posttype
- Querying Posts by Taxonomy From Alternate Network Site
- Query by 2 values of a repeater ACF field
- New WP_query in template not working with CPT+category on some pages
- Comparing timestamps in meta query doesn’t work
- Display two post types ordered by two custom fields
- Include both default and Custom Post Type in query modified inside pre_get_posts
- WP Query group/order by category name
- List all custom post type posts from a given category?
- Display Posts of a Category in Alphabetical Order (Custom Post Type)
- WP_Query with custom post_type and cat retrieving unwanted posts with the custom posts
- Query Custom Post by Category
- Loop through categories and create tab for each
- Having trouble with custom date field for CPT query (WordPress)
- Getting all custom posts with a certain category
- Query Custom Post Types & category_name?
- Show Post Count of a Category
- WP_Query search posts by custom post type and custom taxonomy
- Calculating Bayesian average for custom post type
- CPT posts listed by category with custom rewrite URL, please help!
- Conditional to modify query results
- Is it possible to create a shortcode that will query a post based on taxonomies?
- Use get_post_types to query only custom posts types
- WordPress Orderby Numeric Value Not Working
- Pagination on category page with custom post types
- How to show CPTs in term archive
- showing custom post types of a certain category only
- Linking to the most recent post in a Custom Post Type
- convert custom query to wp_query
- Show custom post type filtered by category
- Search / Filter posts on Title/Content OR Tags
- forming WP_Query for posts of all post types but from specific categories
- creat filter with wp_query
- WP Query with categories only shows one post and ignores the category
- Why is my category template ignoring post type?
- First custom field value (out of several) displayed twice after query
- Prioritize posts in query by meta keys?
- WP_Query orderby and tax_query
- I am trying to hide a custom post type category to logged in users with Pre_Get_Posts
- Different Ways to Query Custom Post Types?
- Showing specific post in order of array wp_query
- WP the_posts() on single-cars.php get category link
- WP_Query Custom Post Type if Category ID Equals
- Custom post types and ‘new WP_Query’
- WP_Query() with custom post type and taxonomy — get all terms?
- How to include category name/id in wp_query for retrieving “custom post type” from a particular category?
- Returning a custom content types with meta values
- List categories, subcategories and posts from custom taxonomy and custom post type
- WP Query results showing posts outside of category ID
- How to get Custom Post Type with Categories wise in WordPress using wp_query
- How to properly use Categories with Custom Post Types
- Query custom posts from custom taxonomy
- Is there a (preferable built-in) way to check what custom queries are used in a theme?
- How to divide Subcategories into pages of parent category wordpress
- Change search query in wordpress custom post type
- WP Query from two Custom Post type fields as statement
- WP Query: If field X is empty, show posts based on field Y
- How to output custom post type title on custom page with category next to it?
- How select query is generated in a Custom Post Type?
- WP_Query for custom taxonomies showing posts from non-specified terms?
- WP_Query with all posts in one custom post type and only posts in another custom post type with a specific category
- post type => ‘any’ not applied my custom queries
- Custom Post By Category
- Only show categories that have posts within custom post type
- Linking posts together with Advanced Custom Fields “both ways”
- Query the title of the page to show posts with matching category in the loop
- Only show current category post
- Get posts of an specific term of a custom taxonomy
- Conditional posts in WP_query for search
- Can’t seem to filter wp_query by current category ID
- Query Pulling the same post twice
- Is it possible to add query parameters on the archive page?
- Custom Post Type + Category archive
- Query child posts on parents single.php?
- Query Posts From Multiple Post Types
- category_name not working in WP_Query
- WordPress can only query up to 766
- Get all custom_post_type posts + blog posts from one category in a single query
- Filter Custom post type by another Custom post type
- Create a list of months based posts
- Using tax_query to get single post per category
- Are custom posts included when getting a categories’ posts?
- Is it possible to make is_category() recursive?
- Load posts via AJAX without draft status
- How to change permalink structure for custom post type and it’s taxonomies?
- How to get_queried_object on multiple objects?
- Remove duplicated values from a loop
- Categories of custom taxonomy don’t show any posts
- Why does accessing url by category cause issues with post types?
- Why does my taxonomy have a category style div id?
- Display a post from custom post type only if all the selected taxonomies and custom field value matches the record
- Can’t Get Parent and Child Categories of Custom Taxonomy to Display
- Custom post type and custom taxonomies display
- Custom Post Type – Admin Columns