single.php 1.1 KB

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 Toujours
  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( 'template-parts/content', get_post_format() ); ?>
  14. <?php
  15. the_post_navigation( array(
  16. 'prev_text' => '<span class="nav-subtitle">' . esc_html__( 'Previous', 'toujours' ) . '</span> <span class="nav-title">%title</span>',
  17. 'next_text' => '<span class="nav-subtitle">' . esc_html__( 'Next', 'toujours' ) . '</span> <span class="nav-title">%title</span>',
  18. ) );
  19. ?>
  20. <?php
  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. endif;
  25. ?>
  26. <?php endwhile; // End of the loop. ?>
  27. </main><!-- #main -->
  28. </div><!-- #primary -->
  29. <?php get_sidebar(); ?>
  30. <?php get_footer(); ?>