milardovich

Wordpress - custom comments.php file

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