single.php 746 B

123456789101112131415161718192021222324252627282930313233
  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. get_header(); ?>
  10. <div id="primary" class="content-area">
  11. <main id="main" class="site-main" role="main">
  12. <?php while ( have_posts() ) : the_post(); ?>
  13. <?php get_template_part( 'content', get_post_format() ); ?>
  14. <?php
  15. // If comments are open or we have at least one comment, load up the comment template
  16. if ( comments_open() || get_comments_number() ) :
  17. comments_template();
  18. endif;
  19. ?>
  20. <?php twentyfifteen_post_nav(); ?>
  21. <?php endwhile; // end of the loop. ?>
  22. </main><!-- .site-main -->
  23. </div><!-- .content-area -->
  24. <?php get_footer(); ?>