single.php 885 B

12345678910111213141516171819202122232425262728293031323334353637
  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 Rebalance
  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 if ( 'jetpack-portfolio' == get_post_type() ) :
  14. get_template_part( 'template-parts/content', 'project' );
  15. else :
  16. get_template_part( 'template-parts/content', 'single' );
  17. endif;
  18. ?>
  19. <?php
  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. ?>
  25. <?php endwhile; // End of the loop. ?>
  26. </main><!-- #main -->
  27. </div><!-- #primary -->
  28. <?php get_sidebar(); ?>
  29. <?php get_footer(); ?>