Avoid going in and out of PHP unnecessarily.

Closes #854

Includes minor alignment changes for easier readability/detection of start/end of conditions.
This commit is contained in:
jrfnl 2015-11-11 22:59:40 +01:00
parent 6f6de25568
commit 8470f55f92
13 changed files with 128 additions and 109 deletions

View file

@ -17,21 +17,22 @@ get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php
while ( have_posts() ) : the_post();
<?php get_template_part( 'template-parts/content', 'page' ); ?>
get_template_part( 'template-parts/content', 'page' );
<?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
<?php endwhile; // End of the loop. ?>
endwhile; // End of the loop.
?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php
get_sidebar();
get_footer();