single.php 831 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * The template for displaying all single posts
  4. *
  5. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
  6. *
  7. * @package Blank Canvas
  8. * @since 1.0.0
  9. */
  10. get_header();
  11. ?>
  12. <section id="primary" class="content-area">
  13. <main id="main" class="site-main" role="main">
  14. <?php
  15. /* Start the Loop */
  16. while ( have_posts() ) :
  17. the_post();
  18. get_template_part( 'template-parts/content/content-singular' );
  19. if ( true === get_theme_mod( 'show_comments', false ) ) :
  20. // If comments are open or we have at least one comment, load up the comment template.
  21. if ( comments_open() || get_comments_number() ) {
  22. comments_template();
  23. }
  24. endif;
  25. endwhile; // End of the loop.
  26. ?>
  27. </main><!-- #main -->
  28. </section><!-- #primary -->
  29. <?php
  30. get_footer();