$args = array(
'tax_query' => array(
array(
'taxonomy' => 'typ',
'field' => 'slug',
'terms' => 'production',
),
),
'post_type' => 'opencourses',
'posts_per_page' => -1,
'post_status' => 'publish',
);
$query = new WP_Query( $args );
Please try above code.
Thanks.
Related Posts:
- Display all posts in a custom post type, grouped by a custom taxonomy
- Should unaltered default loop/query return a list of custom posts belonging to a custom taxonomy?
- Query for posts in 2 taxonomies
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- wp_query to find posts by year and month
- Custom Post Type Loop within Shortcode
- Filter by custom taxonomy slug on a custom post type
- Custom loop with multiple taxonomy queries
- What’s the WP way to load remaining custom posts?
- display posts of custom post type with custom taxonomy
- List all Custom Post Type posts excluding certain Taxnomy term
- Cant’ Display Custom Post Type Title Base on Tax Terms
- Loop for custom-post-type comparing taxonomy terms for “related” posts?
- Multiple custom post type queries causing wrong post types to be grabbed in taxonomy + single templates?
- Query for specific taxonomy that executes a particular loop depending on volume of posts?
- What is the most efficient way to execute recursive complex queries?
- Loop with Custom Post Type and Taxonomies
- Post data in separate divs with incrementing class using WP_Query
- Catergory args causing loop not to show
- display custom post type from register taxonomy
- Complex Custom Loop with Includes
- Exclude a category from WP_Query
- Select All in Parent Category, Group by Child Category?
- get_query_var() not working in pre_get_posts
- query multiple taxonomies
- WP_Query to loop a Custom Field, Custom Post Types do not show
- Sort the main query in subcategories/terms?
- List all posts in Custom Post Type but group dynamically by Custom Taxonomies
- How to show posts from multiple post types in a single loop? And display them separately on the same template
- Custom Taxonomy List links being re-written
- How to display the rest of categories on Portfolio filterable
- Want to filter only parent post in admin area
- Query Custom Post by Category
- ‘category__and’ for custom taxonomy?
- WP_Query and using a variable for ‘cat’=> in the args array = WP Bug?
- Custom post query by taxonomy
- Show Post Count of a Category
- Why does using WP_Query inside a shortcode in an elementor page cause the arguments for WP_Query to get malformed?
- Group custom posts by custom taxonomy names
- How can i skip same post from taxonomy term?
- Only show posts from a certain category?
- shortcode to show custom post types by category
- Get custom taxonomies from multiple posts
- Pagination for Custom Taxonomy Page [duplicate]
- Custom taxonomy rewrite give pagination 404
- Displaying CPT and custom taxonomy side by side in Bootstrap 4 component
- How to have this permalink structure: post_type/postname/custom_inner_page
- Problem: wp_query outputs all images on site
- Advanced search form with filters for custom taxonomies
- Display related custom taxonomy posts in sidebar
- WP the_posts() on single-cars.php get category link
- tax_query not working in template
- Custom Taxonomy Not Showing in Front-End When Outputting a Custom Post Type with WP_Query()
- Multiple Custom Post Type queries, how to DRY it up
- Main query not querying any posts in custom taxonomy template
- Using wp_query to modify the loop in index.php for a CPT
- Custom WP_Query doesn’t display all posts
- WP_Query parameter conflict
- Pagination not working on custom query on a page
- Trying to add a class to post links
- Loop and add Specific Categories and Products Images
- Query Custom Post Type by Taxonomy
- Custom post type pagination error
- Related “custom post type” using “custom taxonomy”
- posts_per_page in custom WP_Query does not override “Reading” settings?
- Custom post type paging return home page
- custom post type and a “sticky” position taxonomy
- Display post count for a specific month
- Order posts alphabetically with numbers but some of the posts has numbers in the title
- SEARCH QUERIES – REVERSE OUTPUT
- WP_Query to display number of custom post type filtered (order by) taxonomy
- Error in the page of a CPT file in WordPress
- post_type incorrect for custom post type
- Live search by custom tag
- Staggering featured post using ‘sticky’
- Multiple Custom Post Type in Taxonomy Archive Causing White Screen
- Adding a Section for Visitors
- Why is my loop not populating the page with my custom taxonomy terms from my custom post type?
- Show parent category and subcategory once in while loop
- Ajax load more inside custom post type taxonomy
- Loop to display parent categories in custom taxonomy
- WP Query tax_query not returning posts
- How to show terms used only for particular custom post type. Filter creation perpose
- Create a custom wp_query from a specific custom post type with specific taxonomy
- Show posts for current taxonomy
- Display all Custom taxonomy terms and their relevant custom posts
- Query pulling all taxonomies, not one I am specifying
- CPT Efficient way to display posts from different categories with custom query
- How To Loop Through list with Custom Post Types
- Query Pulling the same post twice
- Custom Post Type + Category archive
- Loop multiple taxonomy in custom post
- Values inside a custom field to determine which category posts to display
- How to list groupings and keep pagination
- Custom post-type’s pagination not working in category.php
- Listing all custom post types using a specific term on the said term’s template page, in groups
- Custom post type and have_posts() return empty result
- Get all active posts that are tied to a custom taxonomy for a custom post type
- How can I show posts with the same tag?
- WP Query – Can’t get posts with specific taxonomy