single.php 1.1 KB

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 Lodestar
  8. */
  9. get_header(); ?>
  10. <div class="wrap">
  11. <div id="primary" class="content-area">
  12. <main id="main" class="site-main" role="main">
  13. <?php
  14. while ( have_posts() ) : the_post();
  15. get_template_part( 'components/post/content', get_post_format() );
  16. the_post_navigation( array(
  17. 'prev_text' => '<span class="nav-subtitle">' . esc_html__( 'Previous Post', 'lodestar' ) . '</span> <span class="nav-title">%title</span>',
  18. 'next_text' => '<span class="nav-subtitle">' . esc_html__( 'Next Post', 'lodestar' ) . '</span> <span class="nav-title">%title</span>',
  19. ) );
  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. endif;
  24. endwhile; // End of the loop.
  25. ?>
  26. </main><!-- #main -->
  27. </div><!-- #primary -->
  28. <?php get_sidebar(); ?>
  29. </div><!-- .wrap -->
  30. <?php
  31. get_footer();