'post', 'posts_per_page' => $default_posts_per_page, 'paged' => $starlight_paged ); $post_query = new WP_Query($args); if ( $post_query->have_posts() ) : while( $post_query->have_posts() ) : $post_query->the_post(); /* * Include the Post-Format-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 Format name) and that will be used instead. */ get_template_part( 'template-parts/content', get_post_format() ); endwhile; // check if the max number of pages is greater than 1 if ( $post_query->max_num_pages > 1 ) : ?>