For the last two days I tried to loop through a parent category and display my custom post type posts within it.
I've created a custom post type with the name: mentors_post_type and participants_post_type, where I use category as a taxonomy.
'taxonomies' => array( 'category', 'post_tag' ),
Both post types are organized in categories for each year: 2016, 2017, 2018, etc. Somehow I can't achieve to loop through the years category and display the posts and sub-categories like:
(year category) 2017 (subcategory) all posts with custom post type: mentors_post_type 2016 (subcategory) all posts with custom post type: mentors_post_type
No matter how I've tried it, I don't get any posts from the custom post type or all posts from the custom post type (can't filter them by category). When I just get the category names and their post-counts, the post-counts are right.