have_posts() ) : /* Start the Loop */ while ( $the_query->have_posts() ) : $the_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; $pagination_args = array( 'mid_size' => 2, 'prev_text' => '', 'next_text' => '' ); if ( ! is_front_page() && 0 < intval( $page ) ) $pagination_args['base'] = user_trailingslashit( untrailingslashit( get_page_link( $page_ID ) ) . '/page/%#%' ); $GLOBALS['wp_query'] = $the_query; the_posts_pagination( $pagination_args ); else : get_template_part( 'template-parts/content', 'none' ); endif; ?>