single.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * The template for displaying all single posts.
  4. *
  5. * @package Publication
  6. */
  7. get_header(); ?>
  8. <div id="primary" class="content-area">
  9. <main id="main" class="site-main" role="main">
  10. <?php while ( have_posts() ) : the_post(); ?>
  11. <?php get_template_part( 'template-parts/content', 'single' ); ?>
  12. <?php
  13. // If comments are open or we have at least one comment, load up the comment template
  14. if ( comments_open() || get_comments_number() ) {
  15. comments_template();
  16. }
  17. ?>
  18. <?php
  19. // Previous/next post navigation.
  20. the_post_navigation( array(
  21. 'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'publication' ) . '</span> ' . '<span class="screen-reader-text">' . __( 'Next post:', 'publication' ) . '</span> ' . '<span class="post-title">%title</span>',
  22. 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'publication' ) . '</span> ' . '<span class="screen-reader-text">' . __( 'Previous post:', 'publication' ) . '</span> ' . '<span class="post-title">%title</span>',
  23. ) );
  24. ?>
  25. <?php endwhile; // End of the loop. ?>
  26. </main><!-- #main -->
  27. </div><!-- #primary -->
  28. <?php get_sidebar(); ?>
  29. <?php get_footer(); ?>