Advertisement
Guest User

comments.php

a guest
Jun 29th, 2014
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. <?php
  2. /**
  3. * The template for displaying Comments.
  4. *
  5. * The area of the page that contains both current comments
  6. * and the comment form. The actual display of comments is
  7. * handled by a callback to bavotasan_comment() which is
  8. * located in the functions.php file.
  9. *
  10. * @since 1.0.0
  11. */
  12.  
  13. /*
  14. * If the current post is protected by a password and
  15. * the visitor has not yet entered the password we will
  16. * return early without loading the comments.
  17. */
  18. if ( post_password_required() )
  19. return;
  20. ?>
  21.  
  22. <div id="comments" class="comments-area">
  23. <?php // You can start editing here -- including this comment! ?>
  24.  
  25. <?php if ( have_comments() ) : ?>
  26. <h2 id="comments-title">
  27. <i class="fa fa-comments"></i>&nbsp;
  28. <?php
  29. printf( _n( '1 comment for &ldquo;%2$s&rdquo;', '%1$s comments for &ldquo;%2$s&rdquo;', get_comments_number(), 'arcade' ),
  30. number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
  31. ?>
  32. </h2>
  33.  
  34. <ol class="commentlist">
  35. <?php wp_list_comments( array( 'callback' => 'bavotasan_comment' ) ); ?>
  36. </ol><!-- .commentlist -->
  37.  
  38. <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
  39. <div id="comment-nav-below" role="navigation">
  40. <h1 class="sr-only section-heading"><?php _e( 'Comment navigation', 'arcade' ); ?></h1>
  41. <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'arcade' ) ); ?></div>
  42. <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'arcade' ) ); ?></div>
  43. </div>
  44. <?php endif; // check for comment navigation ?>
  45.  
  46. <?php
  47. /* If there are no comments and comments are closed, let's leave a note.
  48. * But we only want the note on posts and pages that had comments in the first place.
  49. */
  50. if ( ! comments_open() && get_comments_number() ) : ?>
  51. <p class="nocomments"><?php _e( 'Comments are closed.' , 'arcade' ); ?></p>
  52. <?php endif; ?>
  53.  
  54. <?php endif; // have_comments() ?>
  55.  
  56. <?php comment_form( array(
  57. 'comment_notes_after' => '',
  58. ) ); ?>
  59. </div><!-- #comments .comments-area -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement