comments.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /*
  3. The comments page for Bones
  4. */
  5. // don't load it if you can't comment
  6. if ( post_password_required() ) {
  7. return;
  8. }
  9. ?>
  10. <!-- You can start editing here. -->
  11. <?php if ( have_comments() ) : ?>
  12. <h3 id="comments-title" class="h2"><?php comments_number( __( '<span>No</span> Comments', 'bonestheme' ), __( '<span>One</span> Comment', 'bonestheme' ), _n( '<span>%</span> Comments', '<span>%</span> Comments', get_comments_number(), 'bonestheme' ) );?></h3>
  13. <section class="commentlist">
  14. <?php
  15. wp_list_comments( array(
  16. 'style' => 'div',
  17. 'short_ping' => true,
  18. 'avatar_size' => 40,
  19. 'callback' => bones_comments,
  20. 'type' => 'all',
  21. 'reply_text' => 'Reply',
  22. 'page' => '',
  23. 'per_page' => '',
  24. 'reverse_top_level' => null,
  25. 'reverse_children' => ''
  26. ) );
  27. ?>
  28. </section>
  29. <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
  30. <nav class="navigation comment-navigation" role="navigation">
  31. <div class="comment-nav-prev"><?php previous_comments_link( __( '&larr; Previous Comments', 'bonestheme' ) ); ?></div>
  32. <div class="comment-nav-next"><?php next_comments_link( __( 'More Comments &rarr;', 'bonestheme' ) ); ?></div>
  33. </nav>
  34. <?php endif; ?>
  35. <?php if ( ! comments_open() ) : ?>
  36. <p class="no-comments"><?php _e( 'Comments are closed.' , 'bonestheme' ); ?></p>
  37. <?php endif; ?>
  38. <?php endif; ?>
  39. <?php comment_form(); ?>