Advertisement
vman678

Comments.php

Sep 25th, 2014
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.26 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 alterna_comment() which is
  8.  * located in the inc/alterna-functions.php file.
  9.  *
  10.  * @since alterna 1.0
  11.  */
  12. ?>
  13.     <div id="comments" class="row-fluid">
  14.         <div class="alterna-title row-fluid">
  15.                 <h3><?php comments_number(__('No Comment','alterna'), __('One Response Comment','alterna'),__('% Response Comments','alterna')); ?></h3>
  16.                 <div class="line row-fluid"><span class="left-line"></span><span class="right-line"></span></div>
  17.         </div>
  18.        
  19.    <?php if ( have_comments() ) : ?>
  20.         <ul class="comment-list row-fluid">
  21.             <?php
  22.                 /* Loop through and list the comments. Tell wp_list_comments()
  23.                  * to use twentyeleven_comment() to format the comments.
  24.                  * If you want to overload this in a child theme then you can
  25.                  * define alterna_comment() and that will be used instead.
  26.                  * See alterna_comment() in alterna/functions.php for more.
  27.                  */
  28.                 wp_list_comments('type=comment&avatar_size=36&callback=alterna_comment');
  29.             ?>
  30.         </ul>
  31.        
  32.         <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
  33.         <nav id="comment-nav-above">
  34.             <div class="next-post"><?php next_comments_link( __( 'Newer Comments &rarr;', 'alterna' ) ); ?></div>
  35.             <div class="pre-post"><?php previous_comments_link( __( '&larr; Older Comments', 'alterna' ) ); ?></div>
  36.         </nav>
  37.         <?php endif; // check for comment navigation ?>
  38.     <?php
  39.         /* If there are no comments and comments are closed, let's leave a little note, shall we?
  40.          * But we don't want the note on pages or post types that do not support comments.
  41.          */
  42.         elseif ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) :
  43.     ?>
  44.         <p class="nocomments"><?php _e( 'Comments are closed.', 'alterna' ); ?></p>
  45.     <?php else : ?>
  46.         <div class="entry-content">
  47.             <p><?php _e( 'You can post first response comment.', 'alterna' ); ?></p>
  48.         </div><!-- .entry-content -->
  49.      <?php endif; ?>
  50.    
  51.     <?php alterna_comment_form();?>
  52. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement