single.php 953 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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 UIU_CSE
  8. */
  9. get_header();
  10. ?>
  11. <main id="primary" class="site-main">
  12. <?php
  13. while ( have_posts() ) :
  14. the_post();
  15. get_template_part( 'template-parts/content', get_post_type() );
  16. the_post_navigation(
  17. array(
  18. 'prev_text' => '<span class="nav-subtitle">' . esc_html__( 'Previous:', 'uiu-cse' ) . '</span> <span class="nav-title">%title</span>',
  19. 'next_text' => '<span class="nav-subtitle">' . esc_html__( 'Next:', 'uiu-cse' ) . '</span> <span class="nav-title">%title</span>',
  20. )
  21. );
  22. // If comments are open or we have at least one comment, load up the comment template.
  23. if ( comments_open() || get_comments_number() ) :
  24. comments_template();
  25. endif;
  26. endwhile; // End of the loop.
  27. ?>
  28. </main><!-- #main -->
  29. <?php
  30. get_sidebar();
  31. get_footer();