forked from mirror/_s
Merge pull request #132 from davidensinger/master
Load comments template only when comments are open or there's at least one comment in image.php and page.php
This commit is contained in:
commit
4134038278
|
@ -109,7 +109,11 @@ get_header();
|
||||||
</footer><!-- .entry-meta -->
|
</footer><!-- .entry-meta -->
|
||||||
</article><!-- #post-<?php the_ID(); ?> -->
|
</article><!-- #post-<?php the_ID(); ?> -->
|
||||||
|
|
||||||
<?php comments_template(); ?>
|
<?php
|
||||||
|
// If comments are open or we have at least one comment, load up the comment template
|
||||||
|
if ( comments_open() || '0' != get_comments_number() )
|
||||||
|
comments_template( '', true );
|
||||||
|
?>
|
||||||
|
|
||||||
<?php endwhile; // end of the loop. ?>
|
<?php endwhile; // end of the loop. ?>
|
||||||
|
|
||||||
|
|
6
page.php
6
page.php
|
@ -20,7 +20,11 @@ get_header(); ?>
|
||||||
|
|
||||||
<?php get_template_part( 'content', 'page' ); ?>
|
<?php get_template_part( 'content', 'page' ); ?>
|
||||||
|
|
||||||
<?php comments_template( '', true ); ?>
|
<?php
|
||||||
|
// If comments are open or we have at least one comment, load up the comment template
|
||||||
|
if ( comments_open() || '0' != get_comments_number() )
|
||||||
|
comments_template( '', true );
|
||||||
|
?>
|
||||||
|
|
||||||
<?php endwhile; // end of the loop. ?>
|
<?php endwhile; // end of the loop. ?>
|
||||||
|
|
||||||
|
|
Reference in New Issue