whyisjake

Jake Spurlock

Apr 30th, 2010
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.26 KB | None | 0 0
  1. <div id="comments-wrapper">
  2. <?php if(have_comments()): ?>
  3.     <div id="comments">
  4.        
  5.         <hr />
  6.         <h3>Customer Comments:</h3>
  7.         <?php
  8.         wp_list_comments(array(
  9.             'avatar_size'=>128,
  10.             'style'=> 'div',
  11.             'callback'=>'uds_comment_new'
  12.         ));
  13.         ?>
  14.     </div>
  15.     <div>
  16.         <div class="align-left"><?php previous_comments_link() ?></div>
  17.         <div class="align-right"><?php next_comments_link() ?></div>
  18.         <div class="clear"></div>
  19.     </div>
  20.    
  21. <?php else: ?> 
  22.     <?php if(comments_open()): ?>
  23.         <p class="comment-info">There are no comments yet</p>
  24.     <?php else: ?>
  25.     <?php endif; ?>
  26. <?php endif; //have comments?>     
  27.     <hr class="comment-divider" />
  28. <?php if(comments_open()): ?>
  29.     <?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>
  30.         <p>
  31.             <a href="<?php echo wp_login_url( get_permalink() ); ?>">Log in</a> <?php wp_register(' or ', '');?> to post a comment.
  32.         </p>
  33.     <?php else : ?>
  34.         <?php if ( is_user_logged_in() ) : ?>
  35.             <p>Logged in as
  36.                 <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>.
  37.                 <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out &raquo;</a>
  38.             </p>
  39.         <?php endif; ?>
  40.         <div id="respond">
  41.             <h3><?php comment_form_title('Leave a comment', 'Reply to %s') ?></h3>
  42.             <form method="post" action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" id="add-comment">
  43.                 <fieldset>
  44.                     <?php comment_id_fields(); ?>
  45.                     <div>
  46.                         <label>Your name:</label>
  47.                         <input type="text" class="input-text" name="author" />
  48.                     </div>
  49.                     <div>
  50.                         <label>Your email:</label>
  51.                         <input type="text" class="input-text" name="email" />
  52.                     </div>
  53.                     <div>
  54.                         <label>Comment:</label>
  55.                         <textarea rows="3" cols="54" name="comment" class="comment-text" id="comment"></textarea>
  56.                     </div>
  57.                     <div class="buttons">
  58.                         <button type="reset">Reset</button>
  59.                         <button type="submit">Submit</button>
  60.                         <div class="cancel-comment-reply">
  61.                         <small><?php cancel_comment_reply_link(); ?></small>
  62.                         </div>
  63.                     </div>
  64.                 </fieldset>
  65.             </form>
  66.            
  67.         </div>
  68.     <?php endif; // If registration required and not logged in ?>
  69. <?php endif; ?>
Add Comment
Please, Sign In to add comment