I've created a custom post type with categories and sub categories, what I need to do is list out the post titles and images for a given sub-category or category in a page template.
I've got as far as getting the all the listed items in the custom post type, but I'm unsure how to go further... any help appreciated.
<?php
$args = array( 'post_type' => 'portfolio', 'posts_per_page' => 10 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
the_title();
echo '<div class="entry-content">';
the_content();
echo '</div>';
endwhile;
?>