web/wp-content/themes/twentyeleven/comments.php
changeset 204 09a1c134465b
parent 194 32102edaa81b
equal deleted inserted replaced
203:f507feede89a 204:09a1c134465b
    61 			<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyeleven' ) ); ?></div>
    61 			<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyeleven' ) ); ?></div>
    62 			<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyeleven' ) ); ?></div>
    62 			<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyeleven' ) ); ?></div>
    63 		</nav>
    63 		</nav>
    64 		<?php endif; // check for comment navigation ?>
    64 		<?php endif; // check for comment navigation ?>
    65 
    65 
    66 	<?php
    66 		<?php
    67 		/* If there are no comments and comments are closed, let's leave a little note, shall we?
    67 		/* If there are no comments and comments are closed, let's leave a little note, shall we?
    68 		 * But we don't want the note on pages or post types that do not support comments.
    68 		 * But we only want the note on posts and pages that had comments in the first place.
    69 		 */
    69 		 */
    70 		elseif ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) :
    70 		if ( ! comments_open() && get_comments_number() ) : ?>
    71 	?>
    71 		<p class="nocomments"><?php _e( 'Comments are closed.' , 'twentyeleven' ); ?></p>
    72 		<p class="nocomments"><?php _e( 'Comments are closed.', 'twentyeleven' ); ?></p>
    72 		<?php endif; ?>
    73 	<?php endif; ?>
    73 
       
    74 	<?php endif; // have_comments() ?>
    74 
    75 
    75 	<?php comment_form(); ?>
    76 	<?php comment_form(); ?>
    76 
    77 
    77 </div><!-- #comments -->
    78 </div><!-- #comments -->