• I have created custom post types called Directory, and have some categorized as Festival, and I have made a template page that should in theory display only those posts, using this code:

    <?php  $args = array( 'post_type' => 'directory', 'category' => 'festival','posts_per_page' => 10 ); $loop = new WP_Query( $args );
    
    while ( $loop->have_posts() ) : $loop->the_post();?>

    However posts categorized as Venue are also appearing.

    Any idea why?

    Thank you

    Al

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Displaying custom post types from one category’ is closed to new replies.