Advertisement
Guest User

Comments.php for Julie

a guest
Feb 5th, 2012
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.    
  3. // Do not delete these lines
  4.  
  5. if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
  6.     die ('Please do not load this page directly. Thanks!');
  7.  
  8. if ( post_password_required() ) { ?>
  9.     <p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.', 'woothemes') ?></p>
  10.  
  11. <?php return; } ?>
  12.  
  13. <?php $comments_by_type = &separate_comments($comments); ?>    
  14.  
  15. <!-- You can start editing here. -->
  16.  
  17. <div id="comments">
  18.  
  19. <?php if ( have_comments() ) : ?>
  20.  
  21.     <?php if ( ! empty($comments_by_type['comment']) ) : ?>
  22.  
  23.         <h3><?php comments_number(__('No Responses', 'woothemes'), __('One Response', 'woothemes'), __('% Responses', 'woothemes') );?> <?php _e('to', 'woothemes') ?> &#8220;<?php the_title(); ?>&#8221;</h3>
  24.  
  25.         <ol class="commentlist">
  26.    
  27.             <?php wp_list_comments('avatar_size=40&callback=custom_comment&type=comment'); ?>
  28.        
  29.         </ol>    
  30.  
  31.         <div class="navigation">
  32.             <div class="fl"><?php previous_comments_link() ?></div>
  33.             <div class="fr"><?php next_comments_link() ?></div>
  34.             <div class="fix"></div>
  35.         </div><!-- /.navigation -->
  36.     <?php endif; ?>
  37.            
  38.     <?php if ( ! empty($comments_by_type['pings']) ) : ?>
  39.            
  40.         <h3 id="pings"><?php _e('Trackbacks/Pingbacks', 'woothemes') ?></h3>
  41.    
  42.         <ol class="pinglist">
  43.             <?php wp_list_comments('type=pings&callback=list_pings'); ?>
  44.         </ol>
  45.        
  46.     <?php endif; ?>
  47.        
  48. <?php else : // this is displayed if there are no comments so far ?>
  49.  
  50.         <?php if ('open' == $post->comment_status) : ?>
  51.             <!-- If comments are open, but there are no comments. -->
  52.             <p class="nocomments"><?php _e('No comments yet.', 'woothemes') ?></p>
  53.  
  54.         <?php else : // comments are closed ?>
  55.             <!-- If comments are closed. -->
  56.             <p class="nocomments"><?php _e('Comments are closed.', 'woothemes') ?></p>
  57.  
  58.         <?php endif; ?>
  59.  
  60. <?php endif; ?>
  61.  
  62. </div> <!-- /#comments_wrap -->
  63.  
  64. <?php if ('open' == $post->comment_status) : ?>
  65.  
  66. <div id="respond">
  67.  
  68. <?php comment_form(); ?>
  69.  
  70.     <div class="fix"></div>
  71.  
  72. </div><!-- /#respond -->
  73.  
  74. <?php endif; // if you delete this the sky will fall on your head ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement