I have a custom Post Type called Movies
, and an associated Taxonomy called Genre
. Now I need to list all CPT(s) which are in Genre of 'Comedy' in my own custom page (regardless of WP parmalink mechanism)
Following code only returns the custom post type moviesCPT
:
$args = array( 'post_type' => 'moviesCPT', '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;
Can you please let me know how to handle this?