Don't like ads? PRO users don't see any ads ;-)
Guest

Comments.php code for Andrew

By: a guest on May 6th, 2012  |  syntax: PHP  |  size: 2.18 KB  |  hits: 63  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php if ( post_password_required() ) : ?>
  2.         <p class="nocomments"><?php _e( 'This post is password protected. Enter the password to view comments.', 'vigilance' ); ?></p>
  3.         <?php
  4.         return;
  5. endif; ?>
  6. <div id="comments">
  7. <?php if ( have_comments() ) : ?>
  8.         <div class="comment-number clear">
  9.                 <span><?php comments_number( __( 'No Responses', 'vigilance' ), __( 'One Response', 'vigilance' ), __( '% Responses', 'vigilance' )); ?></span>
  10.                 <?php if ( comments_open() ) : ?>
  11.                         <a id="leavecomment" href="#respond" title="<?php esc_attr_e( 'Post a comment', 'vigilance' ); ?>"> <?php _e( 'Post a comment', 'vigilance' ); ?></a>
  12.                 <?php endif; ?>
  13.         </div><!--end comment-number-->
  14.         <ol class="commentlist">
  15.                 <?php wp_list_comments( 'type=comment&callback=vigilance_custom_comment' ); ?>
  16.         </ol>
  17.  
  18.         <div class="navigation clear">
  19.                 <div class="alignleft"><?php next_comments_link(__( '&laquo; Older Comments', 'vigilance' )); ?></div>
  20.                 <div class="alignright"><?php previous_comments_link(__( 'Newer Comments &raquo;', 'vigilance' )); ?></div>
  21.         </div>
  22.         <?php if ( ! empty($comments_by_type['pings']) ) : ?>
  23.                 <h3 class="pinghead"><?php _e( 'Trackbacks &amp; Pingbacks', 'vigilance' ); ?></h3>
  24.                 <ol class="pinglist">
  25.                         <?php wp_list_comments( 'type=pings&callback=vigilance_list_pings' ); ?>
  26.                 </ol>
  27.  
  28.                 <div class="navigation clear">
  29.                         <div class="alignleft"><?php next_comments_link(__( '&laquo; Older Pingbacks', 'vigilance' )); ?></div>
  30.                         <div class="alignright"><?php previous_comments_link(__( 'Newer Pingbacks &raquo;', 'vigilance' )); ?></div>
  31.                 </div>
  32.         <?php endif; ?>
  33.         <?php if ( ! comments_open() ) : ?>
  34.                 <p class="note"><?php _e( 'Comments are closed.', 'vigilance' ); ?></p>
  35.         <?php endif; ?>
  36. <?php else : // this is displayed if there are no comments so far ?>
  37.         <?php if ( ! comments_open() ) : ?>
  38.                 <?php if ( ! is_page()) : ?>
  39.                         <!-- If comments are open, but there are no comments. -->
  40.                         <div class="comment-number">
  41.                                 <span><?php _e( 'No comments yet', 'vigilance' ); ?></span>
  42.                         </div>
  43.                         <p class="note"><?php _e( 'Comments are closed.', 'vigilance' ); ?></p>
  44.                 <?php endif; ?>
  45.         <?php endif; ?>
  46. <?php endif; ?>
  47. </div><!--end comments-->
  48.  
  49. <?php comment_form(); ?>