After several hours of debugging I have found what caused the problem. Custom taxonomy ‘cadassist_category’ is used for 2 custom post types: product_document and cadassist_file. The posts for taxanomy with ID 653 were of cadassis_file type. And I tried to get posts of product_document type. That is why I got empty array.
So if you have similar problem then maybe your custom taxonomy is used for several post types and you just query for a wrong post type.
Related Posts:
- How to have this permalink structure: post_type/postname/custom_inner_page
- how to get this tax_query working?
- Get posts by category name
- How to search through all child taxonomies using WP_Query?
- Query a custom taxonomy in a function to create an csv file
- Querying Term Posts in Loop
- Custom Post Type Loop within Shortcode
- Fetch taxonomies by custom post type id array
- Group custom posts by custom taxonomy names
- How to Get Current Custom Post Type Selected Taxonomy Term (Not All Terms)
- How can i skip same post from taxonomy term?
- Filter by custom taxonomy slug on a custom post type
- Displaying a custom post types custom taxonomy value?
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- Pagination : How to remove /page/x/ after a ‘POST’ action on a form returning to page 1
- Display CPT posts based on specific taxonomy
- shortcode to show custom post types by category
- Query/list all terms and their custom post count
- Filtering WP_Query Dynamically on the Front-End
- What template files do I need to customise custom-category-term-links rather than fall back on archive.php?
- Why get_posts() not returning only selected category posts from Custom Post Type?
- Archive for custom taxonomy lists all posts instead of current taxonomy
- Genesis filterable portfolio isotope [closed]
- wp_query check if integer exists in custom field’s array
- Wrong request query on cpt and tax
- Get custom taxonomies from multiple posts
- Pagination for Custom Taxonomy Page [duplicate]
- Search / Filter posts on Title/Content OR Tags
- WP_Query most viewed posts, in multiple Post Types, last 30 days, excluding a specific taxonomy term
- Custom-Posttype & Custom Taxonomy WP_Query
- Custom loop with multiple taxonomy queries
- Return one unique custom post type result when it shares a custom taxonomy in WP_QUERY?
- Help need making decision. Ads rotating site on wordpress
- custom taxonamy and post type
- Return the latest post from a custom Taxonomy and Post Type
- Don’t know how to show custom taxonomies from a custom post_type
- Custom taxonomy rewrite give pagination 404
- WP_Query inside foreach loop returning same value for all options when filtered using ajax
- Stuck in Order by more then one
- Custom WP Query on custom meta and sort by multiple meta keys value
- Display a grid of taxonomy terms at root taxonomy page
- WordPress loop: Show only a Custom Post Type Taxononmy TERM
- How can I made custom taxonomies relationship?
- Query Multiple Custom Posts by Custom Fields
- What’s the WP way to load remaining custom posts?
- Get unique superset of taxonomy terms from a list of custom posts in another hierarchical taxonomy
- Custom taxonomies relationship
- Query Custom Post Type Taxonomy term with multiple parameters
- First custom field value (out of several) displayed twice after query
- How to get the intersection of two terms both from different custom taxonomies
- Add Custom Post Type of specific Custom Taxonomy to regularly blog loop
- WP_Query orderby and tax_query
- How to produce a sub-page-system in WordPress
- Advanced search form with filters for custom taxonomies
- Why is my WP_Query outputting my entries twice?
- How to display Related Posts based on number of taxonomy terms matched
- Retrieve custom post types by custom taxonomies with WP_Query
- 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()
- How to make WP_Query not to show irrelevant posts?
- WordPress wp_query() basic question about args
- Create an archive page for custom post type with custom taxonomy
- Custom WP_Query doesn’t display all posts
- Using page slug in wp_query
- WP_Query() with custom post type and taxonomy — get all terms?
- Custom taxonomy wp_query woes.
- Variable not working in WP_Query
- WP_query – Filter by tax_query and meta_query using multiple select
- Creating two loops based on different logic
- Wp Query with multiple custom tag(taxonomy) by get the terms
- Live search by custom tag
- How to display only child category post in related posts in custom post type?
- WP_Query based on ‘s’ and tax_queries
- WP_query sort by taxonomy
- Custom Taxonomy – fields
- CPT Loop, include taxonomies and disclude others?
- Ajax load more inside custom post type taxonomy
- week days sorting based on starting day
- Query posts based on user preferences
- WP Query tax_query not returning posts
- Create a custom wp_query from a specific custom post type with specific taxonomy
- The most recent post of custom taxonomy
- Error get_posts with Custom Taxonomy and OR relation
- Get post from Category by Priority
- Problems with the WP_Query query for a Custom post type
- How can you use a page for a custom post type?
- Displaying WordPress posts from post and custom post type in custom taxonomy
- Display all Custom taxonomy terms and their relevant custom posts
- Help with Multi Level Category Archive Page
- WordPress get all post with like in terms [duplicate]
- Get posts of an specific term of a custom taxonomy
- Query pulling all taxonomies, not one I am specifying
- Decrement term in for each
- Checking Taxonomy Terms for a Custom Post Type With get_the_terms Not Working
- CPT Efficient way to display posts from different categories with custom query
- Loop carousel slider in wordpress
- Custom post type with custom taxonomy permalinks
- Get archive of posts separated by taxonomies and subtaxonomies
- Query Pulling the same post twice