I've looked around at numerous answers and i can do this for the default 'post' type like so:
$cats = get_categories();
foreach ($cats as $cat) {
$cat_id = $cat->term_id;
echo "<h2>".$cat->name."</h2>";
query_posts("cat=$cat_id&posts_per_page=100");
if (have_posts()) : while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink();?>"><?php the_title(); ?></a>
<?php endwhile; endif; ?>
<?php } ?>
Im unable to display posts for a custom post and its associative taxonomy categories. The CPT and its category taxonomy is defined in my functions file. I'm essentially wanting to dispaly all posts related to each category in set of collections. So the logic of the code is pretty much there, I just cant seem to retieve the correct bit of data to filter the posts the way i'd like.
WP_Query
as you should never usequery_posts