[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * The template for displaying all single posts and attachments 4 * 5 * @package WordPress 6 * @subpackage Twenty_Sixteen 7 * @since Twenty Sixteen 1.0 8 */ 9 10 get_header(); ?> 11 12 <div id="primary" class="content-area"> 13 <main id="main" class="site-main"> 14 <?php 15 // Start the loop. 16 while ( have_posts() ) : 17 the_post(); 18 19 // Include the single post content template. 20 get_template_part( 'template-parts/content', 'single' ); 21 22 // If comments are open or we have at least one comment, load up the comment template. 23 if ( comments_open() || get_comments_number() ) { 24 comments_template(); 25 } 26 27 if ( is_singular( 'attachment' ) ) { 28 // Parent post navigation. 29 the_post_navigation( 30 array( 31 'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentysixteen' ), 32 ) 33 ); 34 } elseif ( is_singular( 'post' ) ) { 35 // Previous/next post navigation. 36 the_post_navigation( 37 array( 38 'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentysixteen' ) . '</span> ' . 39 /* translators: Hidden accessibility text. */ 40 '<span class="screen-reader-text">' . __( 'Next post:', 'twentysixteen' ) . '</span> ' . 41 '<span class="post-title">%title</span>', 42 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentysixteen' ) . '</span> ' . 43 /* translators: Hidden accessibility text. */ 44 '<span class="screen-reader-text">' . __( 'Previous post:', 'twentysixteen' ) . '</span> ' . 45 '<span class="post-title">%title</span>', 46 ) 47 ); 48 } 49 50 // End the loop. 51 endwhile; 52 ?> 53 54 </main><!-- .site-main --> 55 56 <?php get_sidebar( 'content-bottom' ); ?> 57 58 </div><!-- .content-area --> 59 60 <?php get_sidebar(); ?> 61 <?php get_footer(); ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated : Sun Dec 22 08:20:01 2024 | Cross-referenced by PHPXref |