[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-content/themes/twentyfifteen/ -> single.php (source)

   1  <?php
   2  /**
   3   * The template for displaying all single posts and attachments
   4   *
   5   * @package WordPress
   6   * @subpackage Twenty_Fifteen
   7   * @since Twenty Fifteen 1.0
   8   */
   9  
  10  get_header(); ?>
  11  
  12      <div id="primary" class="content-area">
  13          <main id="main" class="site-main">
  14  
  15          <?php
  16          // Start the loop.
  17          while ( have_posts() ) :
  18              the_post();
  19  
  20              /*
  21               * Include the post format-specific template for the content. If you want
  22               * to use this in a child theme, then include a file called content-___.php
  23               * (where ___ is the post format) and that will be used instead.
  24               */
  25              get_template_part( 'content', get_post_format() );
  26  
  27              // If comments are open or we have at least one comment, load up the comment template.
  28              if ( comments_open() || get_comments_number() ) :
  29                  comments_template();
  30              endif;
  31  
  32              // Previous/next post navigation.
  33              the_post_navigation(
  34                  array(
  35                      'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentyfifteen' ) . '</span> ' .
  36                          '<span class="screen-reader-text">' . __( 'Next post:', 'twentyfifteen' ) . '</span> ' .
  37                          '<span class="post-title">%title</span>',
  38                      'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentyfifteen' ) . '</span> ' .
  39                          '<span class="screen-reader-text">' . __( 'Previous post:', 'twentyfifteen' ) . '</span> ' .
  40                          '<span class="post-title">%title</span>',
  41                  )
  42              );
  43  
  44              // End the loop.
  45          endwhile;
  46          ?>
  47  
  48          </main><!-- .site-main -->
  49      </div><!-- .content-area -->
  50  
  51  <?php get_footer(); ?>


Generated: Sat Apr 20 01:00:03 2024 Cross-referenced by PHPXref 0.7.1