single.php 951 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * The template for displaying all single posts.
  4. *
  5. * @package Dyad
  6. */
  7. get_header(); ?>
  8. <main id="primary" class="content-area" role="main">
  9. <?php while ( have_posts() ) : the_post(); ?>
  10. <?php get_template_part( 'template-parts/content', 'single' ); ?>
  11. <?php
  12. the_post_navigation( array(
  13. 'prev_text' => '<div class="nav-previous"><span class="nav-subtitle">' . esc_html__( 'Previous Post', 'dyad-2' ) . '</span> <span class="nav-title">%title</span></div>',
  14. 'next_text' => '<div class="nav-next"><span class="nav-subtitle">' . esc_html__( 'Next Post', 'dyad-2' ) . '</span> <span class="nav-title">%title</span></div>',
  15. ) );
  16. ?>
  17. <?php endwhile; // End of the loop. ?>
  18. <?php
  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. ?>
  24. </main><!-- #primary -->
  25. <?php get_footer(); ?>