An updated theme (based on Atticus Finch) for ClassicPress
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.6 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <div id="comments">
  2. <?php if ( have_comments() ) : ?>
  3. <?php do_action( 'portage_before_comments' ); ?>
  4. <?php
  5. if ( post_password_required() ) {
  6. echo '<p class="nocomments">This post is password protected. Enter the password to view comments.</p>';
  7. return;
  8. }
  9. ?>
  10. <!-- Actual comments are listed here -->
  11. <h3 class="comments-title">
  12. <?php
  13. $post_comments = count( get_comments(array('type' => 'comment','post_id' => $post->ID)) );
  14. printf( _nx( 'One comment on &ldquo;%2$s&rdquo;', '%1$s comments on &ldquo;%2$s&rdquo;', $post_comments, 'comments title', 'portage' ),
  15. number_format_i18n( $post_comments ), '<span>' . get_the_title() . '</span>' );
  16. ?>
  17. </h3>
  18. <ol class="comment-list">
  19. <?php
  20. wp_list_comments( array(
  21. 'style' => 'div',
  22. 'short_ping' => false,
  23. 'avatar_size' => 32,
  24. 'type' => 'comment',
  25. 'format' => 'xhtml',
  26. ) );
  27. ?>
  28. </ol><!-- .comment-list -->
  29. <!-- Pingbacks and trackbacks are listed here -->
  30. <h3 class="comments-title">
  31. <?php
  32. $post_pings = count( get_comments(array( 'type' => 'pings', 'post_id' => $post->ID )) );
  33. if ( $post_pings > 0 ) {
  34. printf( _nx( 'One pingback/trackback on &ldquo;%2$s&rdquo;', '%1$s pingbacks/trackbacks on &ldquo;%2$s&rdquo;', $post_pings, 'pingbacks title', 'portage' ),
  35. number_format_i18n( $post_pings ), '<span>' . get_the_title() . '</span>' );
  36. }
  37. ?>
  38. </h3>
  39. <ol class="comment-list">
  40. <?php
  41. wp_list_comments( array(
  42. 'style' => 'div',
  43. 'short_ping' => true,
  44. 'avatar_size' => 0,
  45. 'type' => 'pings',
  46. 'format' => 'xhtml',
  47. ) );
  48. ?>
  49. </ol><!-- .comment-list -->
  50. <?php
  51. // Are there comments to navigate through?
  52. if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
  53. ?>
  54. <nav class="navigation comment-navigation" role="navigation">
  55. <h1 class="screen-reader-text section-heading"><?php _e( 'Comment navigation', 'portage' ); ?></h1>
  56. <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'portage' ) ); ?></div>
  57. <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'portage' ) ); ?></div>
  58. </nav><!-- .comment-navigation -->
  59. <?php endif; // Check for comment navigation ?>
  60. <?php if ( ! comments_open() && get_comments_number() ) : ?>
  61. <p class="no-comments"><?php _e( 'Sorry, but comments are closed.' , 'portage' ); ?></p>
  62. <?php endif; ?>
  63. <?php do_action( 'portage_after_comments' ); ?>
  64. <?php endif; // have_comments() ?>
  65. <?php do_action( 'portage_before_comment_form' ) ?>
  66. <?php comment_form(); ?>
  67. <?php do_action( 'portage_after_comment_form' ) ?>
  68. </div>