Advertisement
Guest User

Comments.php code for theresavs

a guest
Mar 14th, 2012
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. // Do not delete these lines
  3.     if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
  4.         die ('Please do not load this page directly. Thanks!');
  5.  
  6.     if ( post_password_required() ) { ?>
  7.         <p class="nocomments">This post is password protected. Enter the password to view comments.</p>
  8.     <?php
  9.         return;
  10.     }
  11. ?>
  12.  
  13. <!-- You can start editing here. -->
  14.  
  15. <?php if ( have_comments() ) : ?>
  16.     <h3 id="comments"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to &#8220;<?php the_title(); ?>&#8221;</h3>
  17.  
  18.     <ol class="commentlist">
  19.     <?php wp_list_comments(); ?>
  20.     </ol>
  21.  
  22.     <div class="breaker"></div>
  23.  <?php else : // this is displayed if there are no comments so far ?>
  24.  
  25.     <?php if ( comments_open() ) : ?>
  26.         <!-- If comments are open, but there are no comments. -->
  27.  
  28.      <?php else : // comments are closed ?>
  29.         <!-- If comments are closed. -->
  30.         <p class="nocomments">Comments are closed.</p>
  31.  
  32.     <?php endif; ?>
  33. <?php endif; ?>
  34.  
  35.  
  36. <?php if ( comments_open() ) : ?>
  37.  
  38. <div id="respond">
  39.  
  40. <?php comment_form(); ?>
  41.  
  42. <?php endif; // If registration required and not logged in ?>
  43. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement