3 * The template for displaying all single posts and attachments
6 * @subpackage Twenty_Sixteen
7 * @since Twenty Sixteen 1.0
12 <div id="primary" class="content-area">
13 <main id="main" class="site-main" role="main">
16 while ( have_posts() ) : the_post();
18 // Include the single post content template.
19 get_template_part( 'template-parts/content', 'single' );
21 // If comments are open or we have at least one comment, load up the comment template.
22 if ( comments_open() || get_comments_number() ) {
26 if ( is_singular( 'attachment' ) ) {
27 // Parent post navigation.
28 the_post_navigation( array(
29 'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentysixteen' ),
31 } elseif ( is_singular( 'post' ) ) {
32 // Previous/next post navigation.
33 the_post_navigation( array(
34 'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentysixteen' ) . '</span> ' .
35 '<span class="screen-reader-text">' . __( 'Next post:', 'twentysixteen' ) . '</span> ' .
36 '<span class="post-title">%title</span>',
37 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentysixteen' ) . '</span> ' .
38 '<span class="screen-reader-text">' . __( 'Previous post:', 'twentysixteen' ) . '</span> ' .
39 '<span class="post-title">%title</span>',
47 </main><!-- .site-main -->
49 <?php get_sidebar( 'content-bottom' ); ?>
51 </div><!-- .content-area -->
53 <?php get_sidebar(); ?>
54 <?php get_footer(); ?>