3 * The main template file
5 * This is the most generic template file in a WordPress theme
6 * and one of the two required files for a theme (the other being style.css).
7 * It is used to display a page when nothing more specific matches a query.
8 * E.g., it puts together the home page when no home.php file exists.
10 * @link http://codex.wordpress.org/Template_Hierarchy
13 * @subpackage Twenty_Sixteen
14 * @since Twenty Sixteen 1.0
19 <div id="primary" class="content-area">
20 <main id="main" class="site-main" role="main">
22 <?php if ( have_posts() ) : ?>
24 <?php if ( is_home() && ! is_front_page() ) : ?>
26 <h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
32 while ( have_posts() ) : the_post();
35 * Include the Post-Format-specific template for the content.
36 * If you want to override this in a child theme, then include a file
37 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
39 get_template_part( 'template-parts/content', get_post_format() );
44 // Previous/next page navigation.
45 the_posts_pagination( array(
46 'prev_text' => __( 'Previous page', 'twentysixteen' ),
47 'next_text' => __( 'Next page', 'twentysixteen' ),
48 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
51 // If no content, include the "No posts found" template.
53 get_template_part( 'template-parts/content', 'none' );
58 </main><!-- .site-main -->
59 </div><!-- .content-area -->
61 <?php get_sidebar(); ?>
62 <?php get_footer(); ?>