I figured it out. Thanks to an answer posted here. The code is
$term_slug = get_query_var( 'term' );
$query_args = array(
'taxonomy' => 'news_category',
'term' => $term_slug,
'post_type' => 'news'
);
Related Posts:
- Taxonomy, Terms, and Template Files
- How to pass URL parameters for advanced taxonomy queries with multiple terms for one custom taxonomy
- Templates for Custom Post Types and Custom Taxonomies
- Get page by template?
- Need some templating advice for templating with custom post types and taxonomies
- Custom Post Type with Nested Taxonomy and Template Files
- Custom Post Type Archive Template
- custom post type archive template per custom taxonomy term
- custom taxonomy – Template not working
- Include different loop templates in search query
- Create separate template for shared custom taxonomy with shared terms
- Trying to manage templates on a blog with lots of custom taxonomies
- How do I provide a “show all posts” link in a paginated term archive?
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- Query with no terms uses index.php template instead of archive.php
- Create template for taxonomy results limited by Custom Post Type
- Template for custom post with custom taxonomy
- Custom taxonomy and custom post type – wrong permalinks and template
- WordPress Doesn’t Generate Taxonomy Archive
- Custom taxonomy returns 404
- Template for all categories of a custom post type?
- Migrating a taxonomy’s tags to the native category
- WordPress custom taxonomy template not working
- How can I get this request to use the Custom Post Type page template instead?
- Archive for a Taxonomy of a Custom Post type
- Template files for Custom Post Type and Taxonomy
- Main query not querying any posts in custom taxonomy template
- Loop through custom posts by taxonomy and display the titles in a list, it is repeating 8 times
- Which file/template is in charge of taxonomies for custom post types?
- How to get_term_meta on single custom post?
- Get template part with CPT and Custom Taxonomy conditionals
- How to create a template to show child terms of a MAIN taxonomy
- How to change single custom post template by custom taxonomy?
- Create a custom taxonomy template that loops through child categories in term order?
- Post template with breadcrumb needs to show page navigated from
- Custom Post Taxonomy Template Not Loading Properly
- taxonomy – templates are not loading
- Custom taxonomy with custom post type template not showing
- Custom taxonomy template for custom fields loop [closed]
- Templates for CPT not working
- Single taxonomy for different custom post types
- How should i name the .php file to show custom posts under a taxonomy’s term?
- I want to create an archive and single page for a custom taxonomy for a custom post type
- Custom Post Type tag taxonomy “Page Not Found”
- template structure for CPT not clear
- WordPress Custom taxonomy template
- How to display custom post types AND regular posts separately on a shared taxonomy archive?
- Querying multiple taxonomies in URL leads to wrong taxonomy archive
- Listing all custom post types using a specific term on the said term’s template page, in groups
- Most appropriate way to display CPT’s by children terms of custom taxonomies while retaining desired permalink structure?
- Only One Post of Custom Post Type Appearing on Template Page
- Custom Post Types using wrong template (index) instead of archive-{type}.php – previously worked as expected
- Mixing custom post type and taxonomy rewrite structures?
- Can multiple custom post types share a custom taxonomy?
- How to Add Custom Fields to a Custom Post Type?
- Display current taxonomy term when inside custom post type
- limit selection of custom taxonomies to one?
- $wp_query->queried_object->ID throws warning: Undefined property
- Multiple custom post types using the same taxonomy = URL frustrations
- Order custom posts by taxonomy?
- Maintaining strict one-to-one association between terms and custom posts
- Date-based permalinks for Custom Post Type, and custom taxonomy permalinks
- Get all taxonomies for all post types
- Lock post meta block at the bottom of a custom post type
- Linking three taxonomies with ACF
- Display Custom Taxonomy
- How to List Thumbnails based on Custom Categories
- Automatically populate a hierarchical taxonomy from a custom field
- Keyword search limited to specific post type filtered by multiple custom taxonomies?
- Custom Post Types and independent Categories – complex Taxonomy
- get_post_meta returns empty array for terms
- Custom post type not using custom template
- Display as tree terms of taxonomy and custom posts for each term of taxonomy
- Post count by month of taxonmy term
- Pretty URL for custom search for custom post type
- First custom field value (out of several) displayed twice after query
- Custom while loop for hierarchical display of a taxonomy
- Grouping of CPTs and taxonomies into menu groups in admin
- set permalink for CPT
- Check if post has specific tag_ID in custom post type
- custom post type vs. conditionally displaying meta boxes for specific terms?
- WP_query – Filter by tax_query and meta_query using multiple select
- Hide meta box for everything BUT a certain custom post type
- Only show posts with a specific term of an associated taxonomy in a custom post type archive
- Display custom tags for custom post listing page
- What should I learn to develop event management in wordpress? [closed]
- Confusion about how to use Custom Post Types, Custom Taxonomy or Category?
- Displaying Posts Using a Custom Query with a Custom Field and a term_id
- Get taxonomy name used in a current post
- Custom Taxonomy Archive generates 404
- Support for author does not show author column in post table in dashboard
- WordPress custom post type
- How to have working breadcrumbs with several taxonomies associated with a custom post type
- Show Custom Post Type taxonomy term that matches custom field
- How to Display Custom Taxonomies in an Un-ordered HTML List
- link posts to custom post type
- how do I create a breadcrumb to work with multiple custom taxonomies
- Navigation won’t update to show full path to single post
- Filtering custom post types using category taxonomy
- How to use wp_set_object_terms depending on page ID?