milardovich

Wordpress - custom comments.php file 0.1.1

Jul 3rd, 2011
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.53 KB | None | 0 0
  1. <div class="comentarios">
  2.     <h4>Comentarios</h4>
  3.  
  4. <?php if ( have_comments() ) : ?>
  5.  
  6.  
  7. <?php   wp_list_comments('type=comment&callback=ominid_comment'); ?>
  8.  
  9.  
  10. <?php else : // or, if we don't have comments:
  11.  
  12.     /* If there are no comments and comments are closed,
  13.      * let's leave a little note, shall we?
  14.      */
  15.     if ( ! comments_open() ) :
  16. ?>
  17.     <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p>
  18. <?php endif; // end ! comments_open() ?>
  19.  
  20. <?php endif; // end have_comments() ?>
  21. <?php
  22. $commenter = wp_get_current_commenter();
  23.  
  24. $fields =  array(
  25.     'author' => '<input id="nombre" name="author" type="text" value="'.__( 'Name' ).'" size="30"' . $aria_req . ' />',
  26.     'email'  => '<input id="email" name="email" type="text" value="'.__( 'Email' ).'" size="30"' . $aria_req . ' />',
  27.     'url'    => '<input id="url" name="url" type="text" value="'.__( 'Website' ).'" size="30" />'
  28. );
  29. $defaults = array(
  30.     'fields' => $fields,
  31.     'label_submit' => 'Enviar comentario',
  32.     'comment_notes_after' => null,
  33.     'comment_notes_before' => null,
  34.     'comment_field' => '<label for="comment">' . _x( 'Comment', 'noun' ) . '<textarea id="comment" name="comment" cols="45" rows="8" aria-required="true">Comentario</textarea></label>',
  35.     'title_reply' => comment_form_title(false,false,false)
  36. ); ?>
  37. <div class="form-respuesta">
  38.     <?php comment_form($defaults); ?>
  39. </div>
  40.  
  41. </div>
  42.  
  43. <?php else : // or, if we don't have comments:
  44.  
  45.     /* If there are no comments and comments are closed,
  46.      * let's leave a little note, shall we?
  47.      */
  48.     if ( ! comme
Advertisement
Add Comment
Please, Sign In to add comment