'comics',
'post_status' => 'publish',
'posts_per_page' => 10,
'paged' => $comics_paged,
'orderby' => 'post_date',
'order' => 'DESC',
);
$comics_query = new WP_Query( $comics_args );
?>
have_posts()) :
?>
1,
'post_type' => 'comics',
"tax_query" => array(
array (
'taxonomy' => "chapters", // use the $tax you define at the top of your script
'field' => 'term_id',
'terms' => $chapter->term_id, // use the current term in your foreach loop
),
),
'no_found_rows' => true,
'update_post_meta_cache' => false,
'update_post_term_cache' => false
);
$first_comic_query = new WP_Query( $args );
// The Loop
while ( $first_comic_query->have_posts() ) : $first_comic_query->the_post();
$link_to_first_comic = get_post_permalink(); // Display the image of the first post in category
endwhile;
echo '';
}
// Reset Post Data
wp_reset_postdata();
?>
-
have_posts() ) : $comics_query->the_post();
/*
* Include the Post-Type-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Type name) and that will be used instead.
*/
get_template_part( 'template-parts/content', 'comiclistitem' );
endwhile;
?>