forked from mirror/_s
Consistent navigation
Handle the comment navigation the same way as the new the_post_navigation() and the_posts_navigation().
This commit is contained in:
parent
56bad5250d
commit
e45aff27ed
24
comments.php
24
comments.php
|
@ -31,10 +31,14 @@ if ( post_password_required() ) {
|
|||
</h2>
|
||||
|
||||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
|
||||
<nav id="comment-nav-above" class="comment-navigation" role="navigation">
|
||||
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', '_s' ); ?></h1>
|
||||
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', '_s' ) ); ?></div>
|
||||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', '_s' ) ); ?></div>
|
||||
<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
|
||||
<h2 class="screen-reader-text"><?php _e( 'Comment navigation', '_s' ); ?></h2>
|
||||
<div class="nav-links">
|
||||
|
||||
<div class="nav-previous"><?php previous_comments_link( __( 'Older Comments', '_s' ) ); ?></div>
|
||||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments', '_s' ) ); ?></div>
|
||||
|
||||
</div><!-- .nav-links -->
|
||||
</nav><!-- #comment-nav-above -->
|
||||
<?php endif; // check for comment navigation ?>
|
||||
|
||||
|
@ -48,10 +52,14 @@ if ( post_password_required() ) {
|
|||
</ol><!-- .comment-list -->
|
||||
|
||||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
|
||||
<nav id="comment-nav-below" class="comment-navigation" role="navigation">
|
||||
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', '_s' ); ?></h1>
|
||||
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', '_s' ) ); ?></div>
|
||||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', '_s' ) ); ?></div>
|
||||
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
|
||||
<h2 class="screen-reader-text"><?php _e( 'Comment navigation', '_s' ); ?></h2>
|
||||
<div class="nav-links">
|
||||
|
||||
<div class="nav-previous"><?php previous_comments_link( __( 'Older Comments', '_s' ) ); ?></div>
|
||||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments', '_s' ) ); ?></div>
|
||||
|
||||
</div><!-- .nav-links -->
|
||||
</nav><!-- #comment-nav-below -->
|
||||
<?php endif; // check for comment navigation ?>
|
||||
|
||||
|
|
Reference in New Issue