single.php 751 B

123456789101112131415161718192021222324252627282930313233343536373839
  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 photos
  8. */
  9. get_header();
  10. ?>
  11. <div id="primary" class="content-area">
  12. <main id="main" class="site-main">
  13. <?php
  14. while ( have_posts() ) :
  15. the_post();
  16. get_template_part( 'template-parts/content', get_post_type() );
  17. photos_related_posts();
  18. photos_post_navigation();
  19. // If comments are open or we have at least one comment, load up the comment template.
  20. if ( comments_open() || get_comments_number() ) :
  21. comments_template();
  22. endif;
  23. endwhile; // End of the loop.
  24. ?>
  25. </main><!-- #main -->
  26. </div><!-- #primary -->
  27. <?php
  28. get_sidebar();
  29. get_footer();