If you’d like to include the post
post type, it needs to be added to the post_type
parameter for WP_Query
:
$args = array('post_type' => array( 'post', 'resources' ),
'tax_query' => array(
array(
'taxonomy' => 'resource',
'field' => 'slug',
'terms' => $custom_term->slug,
),
),
);
Related Posts:
- How to get the parent’s taxonomy?
- Show Post Count of a Category
- Fetch taxonomies by custom post type id array
- Variable not working in WP_Query
- Get posts by category name
- Query Custom Post Type by Taxonomy
- WP_Query for custom taxonomies showing posts from non-specified terms?
- Custom Taxonomy – fields
- How to display elements of different post types?
- Saving Taxonomy Terms
- Get Posts by Custom Post Type ,Taxonomy, and Term
- How do I append multiple taxonomies to the URL?
- Custom Taxonomy’s Label to change the text appearing in Appearance > Menu
- How to completely disable a taxonomy archive on the frontend?
- How to limit the number of terms (terms acts like categories)
- How can I list all the categories under a Custom Post Type (taxonomy)?
- Taxonomy archives based on Custom Post Type
- Get the ‘slug’ of a custom taxonomy
- Custom Metabox with Taxonomy Dropdown – Saving Issue
- Displaying Posts Related to Other Posts by a Taxonomy Term?
- Adding a term name from a custom taxonomy assigned to a post link displayed by a wp_query loop based on another taxonomy
- Querying Posts by Taxonomy From Alternate Network Site
- Include custom post type in “all posts”
- custom post type paging not working past page 3
- Should unaltered default loop/query return a list of custom posts belonging to a custom taxonomy?
- Query for posts in 2 taxonomies
- Get all taxonomies for all post types
- Is slug “type” reserved and can’t be used in taxonomy rewrite?
- Remove Taxonomy Slug when No Taxonomy is Assigned to Custom Post Type?
- WP_Query search posts by custom post type and custom taxonomy
- Custom Post Type Loop within Shortcode
- Query Multiple Taxominies Across Multiple Post type’s
- Display CPT posts based on specific taxonomy
- Filtering WP_Query Dynamically on the Front-End
- Why get_posts() not returning only selected category posts from Custom Post Type?
- Return one unique custom post type result when it shares a custom taxonomy in WP_QUERY?
- Custom Taxonomy back-end customizations
- Taxonomy custom post type URL
- How can I made custom taxonomies relationship?
- Custom taxonomies relationship
- How do I display the taxonomy for a custom post type in an array
- How to conditionally redirect to the post from a taxonomy page?
- Suggested Post and Taxonomy structure
- First custom field value (out of several) displayed twice after query
- Custom post with more than one custom taxonomy
- WP_Query orderby and tax_query
- How do I share categories across multiple post types?
- Multiple tag cloud filtering
- Get url.com/post_type/taxonomy/term work!
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- How to make WP_Query not to show irrelevant posts?
- Custom select query for taxonomies that have posts categorized in another taxonomy
- Create an archive page for custom post type with custom taxonomy
- WP_query – Filter by tax_query and meta_query using multiple select
- Hide meta box for everything BUT a certain custom post type
- How can I create an automatic drop down menu with my tags?
- how to get this tax_query working?
- Get taxonomy singular name instead of taxonomy slug inside $taxonomy query
- How to sort a WP_Query by a custom field AND ALSO filter by a different custom field
- Custom taxonomy template list not working (404)
- Use the custom post type archive for taxonomies?
- Custom post type and custom taxonomy 404 on page 2
- Taxonomy template page not working
- tax_query (if the terms are empty)
- How to count other posts not having specific taxonomy terms?
- Running a custom query inside another cpt single and trying to grab a variable
- Custom Post taxonomy template
- Query Multiple Custom Post Types & Exclude a Taxonomy Term
- Query for specific taxonomy that executes a particular loop depending on volume of posts?
- set object terms after some some time of published post – functions.php
- Sort custom posts by date and then by taxonomy
- Display related CPT with custom taxonomy
- How can i display a taxonomy? i have created a plugin and then a custom type. and a taxonomy , also i have register it
- Define multiple prefixes for custom post type
- Taxonomies are not showing in the category dropdown
- Change custom post taxonomy values from front-end
- Display 3 level taxonomies
- List posts that have the current url taxonomy
- How to transfer categories (default) to custom taxonomy?
- WP_query sort by taxonomy
- CPT Loop, include taxonomies and disclude others?
- Pages of my taxonomy terms are showing all posts
- If custom taxonomy exist on post?
- How to get all posts assigned to a taxonomy term only?
- How to show post which has the specific taxonomy terms?
- WordPress add taxonomies/terms list as a menu in archive page
- WP_Query for CPT with filter by another WP_Query
- How to pass taxonomy terms to WP_Query along with $args?
- Custom Taxonomy Query by Taxonomny not working
- How to query posts by meta keys AND under specific category?
- Shortcode display CPT Query only showing 1 post?
- Custom post type post taxonomies
- insert a taxonomy for a custom post type
- Storing/querying custom date data
- WP Query Post Type with same Taxonomy name
- Display associated taxonomy child name on single CPT page
- Issue On Listing Woocommerce Parent Tag List
- WP Query Conditionally query meta and taxonomy
- WP Query – Can’t get posts with specific taxonomy