I think you are using the tax query in wrong way. Please use 'tax_query' => array( array( 'taxonomy' => '$term->taxonomy', 'field' => 'slug', 'terms' => '$term->slug' ) ),
instead of 'taxonomy' => $term->taxonomy, 'term' => $term->slug,
It will work fine.
Related Posts:
- Display Custom Taxonomy Alphabetically
- Listing all term items alphabetically / sorting loop
- Query for specific taxonomy that executes a particular loop depending on volume of posts?
- Excluded Custom Taxonomy Term Posts Displaying in loop
- Display title of all custom posts from same taxonomy term on a custom post template
- Add active class to foundation 6 tabs while looping categories
- How to show terms used only for particular custom post type. Filter creation perpose
- Get terms by taxonomy AND post_type
- How do I list custom taxonomy terms without the links?
- query multiple taxonomies
- wp_set_object_terms() is not replacing term, but creating a new one
- Get terms that contain posts that in turn belong to other terms?
- Custom Post Type Archive Template
- Retrieve a specific field from taxonomy term through advanced custom fields [closed]
- Sort the main query in subcategories/terms?
- List all posts in Custom Post Type but group dynamically by Custom Taxonomies
- Taxonomy posts on Archive page
- How to display the rest of categories on Portfolio filterable
- Get list of terms of current taxonomy archive for another taxonomy
- Dynamically create/remove terms in taxonomy when custom post type is published/trashed
- ‘category__and’ for custom taxonomy?
- How to get the first term for the current taxonomy?
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- How to filter the taxonomy terms based on another taxonomy term
- How to output wordpress custom tags separated by comma?
- get_the_terms return only last term
- Only show posts from a certain category?
- get_attached_media() on author page not working
- Show posts from two or more custom taxonomy terms
- Custom loop with multiple taxonomy queries
- Custom post type multiple loop by taxonomy term
- List custom taxonomy specific to one custom post type
- Display post as term id
- Displaying CPT and custom taxonomy side by side in Bootstrap 4 component
- Group CPT posts by custom taxonomy
- What’s the WP way to load remaining custom posts?
- Get terms that contain posts that in turn belong to other terms?
- How to get custom posts sub category link
- Display related custom taxonomy posts in sidebar
- Query posts with double taxonomy
- get_the_title() is returning results from previous loop
- Adding predefined terms to a taxonomy
- Main query not querying any posts in custom taxonomy template
- Custom query – get_the_terms not work
- Shared terms between taxonomies
- How to get dropdown instance value in WordPress custom Widget
- custom hierarchical taxonomy and custom post type list contains surplus posts
- get_terms() returns Trying to get property of non-object error for custom taxonomy
- Urls in Custom Post Type work for Terms but not for its Taxonomies
- get_terms() parent, child and grandchild
- Custom Taxonomy Terms in Menu lead to which page?
- List all Custom Post Type posts excluding certain Taxnomy term
- Compare Two Custom Post Types Using The Same Custom Taxonomy
- Add filter to Admin list for all custom post types by their custom taxonomies
- Add the custom post term to the custom post title
- Loop and add Specific Categories and Products Images
- Custom taxonomy not saving correctly
- Multiple custom post type queries causing wrong post types to be grabbed in taxonomy + single templates?
- Taxonomy terms with the same name are updated between separate custom post types
- How can I loop at a Specific Taxonomy from a custom post type?
- Custom archive page for custom taxonomy and pagination issue
- Add a class to a div if custom post type has specific terms?
- Custom post type paging return home page
- Return multiples taxonomies with wp_get_object_terms
- Custom taxonomy terms hierarchical navigation
- How to list posts by terms
- 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
- List all posts associated under custom taxonomy
- Pages of my taxonomy terms are showing all posts
- Loop to display parent categories in custom taxonomy
- Custom taxonomy template for custom fields loop [closed]
- How to get all posts related to a taxonomy?
- Custom taxonomy- only output relevant terms
- Show posts for current taxonomy
- order taxonomy alphabetical
- Custom post types not displaying per category
- Filter Term By Parent Term – Custom Post Type
- Display all Custom taxonomy terms and their relevant custom posts
- WordPress get all post with like in terms [duplicate]
- Decrement term in for each
- Custom post type with custom taxonomy permalinks
- Best way to group posts based on custom post type terms
- Custom Post Status & Taxonomies
- Prevent repetitive terms in get_the_term_list
- Loop multiple taxonomy in custom post
- Post data in separate divs with incrementing class using WP_Query
- How to retrieve the permalink for a specific (custom) term?
- Get term_id for each instance of custom taxonomy
- List a custom taxonomy’s terms, with links, on the taxonomy page
- install.php Custom Taxonomy Term not being added to custom post
- show 10 most recent custom post types excluding the one(s) from specific custom taxonomy
- How to Get The Taxonomy Term in Custom Post Type Loop Inside a Wp Query
- display custom post type from register taxonomy
- How to manage a bookstore
- Get all active posts that are tied to a custom taxonomy for a custom post type
- Complex Custom Loop with Includes
- Taxonomy Archive URL + Template