sierre

Comments Form: MAIN

Jun 3rd, 2022 (edited)
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.19 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The template for displaying Comments.
  4.  *
  5.  * The area of the page that contains comments and the comment form.
  6.  *
  7.  * @package WordPress
  8.  * @subpackage Twenty_Thirteen
  9.  * @since Twenty Thirteen 1.0
  10.  */
  11.  
  12. /*
  13.  * If the current post is protected by a password and the visitor has not yet
  14.  * entered the password we will return early without loading the comments.
  15.  */
  16. if ( post_password_required() )
  17.     return;
  18. ?>
  19.  
  20. <div id="comments" class="comments-area">
  21.  
  22. <?php comment_form(); ?>
  23.  
  24.     <?php if ( have_comments() ) : ?>
  25.         <h2 class="comments-title">
  26.             <?php
  27.                 printf( _nx( 'One response on "%2$s"', '%1$s responses on "%2$s"', get_comments_number(), 'comments title', 'twentythirteen' ),
  28.                     number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
  29.             ?>
  30.         </h2>
  31.  
  32.         <ol class="comment-list">
  33.             <?php
  34.                 wp_list_comments( array(
  35.                     'style'       => 'ol',
  36.                     'short_ping'  => true,
  37.                     'avatar_size' => 74,
  38.                     //'callback' => 'not_default_comments',
  39.                 ) );
  40.             ?>
  41.         </ol><!-- .comment-list -->
  42.  
  43.         <?php
  44.             // Are there comments to navigate through?
  45.             if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
  46.         ?>
  47.         <nav class="navigation comment-navigation" role="navigation">
  48.             <h1 class="screen-reader-text section-heading"><?php _e( 'Comment navigation', 'twentythirteen' ); ?></h1>
  49.             <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentythirteen' ) ); ?></div>
  50.             <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentythirteen' ) ); ?></div>
  51.         </nav><!-- .comment-navigation -->
  52.         <?php endif; // Check for comment navigation ?>
  53.  
  54.         <?php if ( ! comments_open() && get_comments_number() ) : ?>
  55.         <p class="no-comments"><?php _e( 'Comments are closed.' , 'twentythirteen' ); ?></p>
  56.         <?php endif; ?>
  57.  
  58.     <?php endif; // have_comments() ?>
  59.  
  60.    
  61.  
  62. </div><!-- #comments -->
Add Comment
Please, Sign In to add comment