single.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 Shoreditch
  8. */
  9. get_header(); ?>
  10. <?php
  11. while ( have_posts() ) : the_post();
  12. get_template_part( 'template-parts/content', 'hero' );
  13. endwhile; // End of the loop.
  14. ?>
  15. <div class="site-content-wrapper">
  16. <div id="primary" class="content-area">
  17. <main id="main" class="site-main" role="main">
  18. <?php
  19. while ( have_posts() ) : the_post();
  20. get_template_part( 'template-parts/content', get_post_format() );
  21. // If comments are open or we have at least one comment, load up the comment template.
  22. if ( comments_open() || get_comments_number() ) {
  23. comments_template();
  24. }
  25. the_post_navigation( array(
  26. 'next_text' => '<span class="meta-nav" aria-hidden="true">' . esc_html__( 'Next', 'shoreditch' ) . '</span> ' . '<span class="screen-reader-text">' . esc_html__( 'Next post:', 'shoreditch' ) . '</span> ' . '<span class="post-title">%title</span>',
  27. 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . esc_html__( 'Previous', 'shoreditch' ) . '</span> ' . '<span class="screen-reader-text">' . esc_html__( 'Previous post:', 'shoreditch' ) . '</span> ' . '<span class="post-title">%title</span>',
  28. ) );
  29. endwhile; // End of the loop.
  30. ?>
  31. </main><!-- #main -->
  32. </div><!-- #primary -->
  33. <?php get_sidebar(); ?>
  34. </div><!-- .site-content-wrapper -->
  35. <?php
  36. get_sidebar( 'footer' );
  37. get_footer();