Posted By

xma on 09/09/13


Tagged

wordpress


Versions (?)

form standard wordpress comment


 / Published in: HTML
 

Form standard for wordpress comment

  1. <div id="respond">
  2.  
  3. <!-- START TITLE LEAVE A REPLY -->
  4. <h2 id="leave-reply">Lascia un commento</h2>
  5. <!-- END TITLE LEAVE A REPLY -->
  6.  
  7. <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  8. <!-- START MESSAGE REQUEST REGISTRATION COMMENTS -->
  9. <p><?php printf(__('Devi eseguire il <a href="%s">login</a> per inserire un commento.', 'yiw'), get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink())); ?></p>
  10. <!-- END MESSAGE REQUEST REGISTRATION COMMENTS -->
  11. <?php else : ?>
  12.  
  13. <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  14.  
  15. <?php if ( $user_ID ) : ?>
  16. <p><?php printf(__('Sei loggato come <a href="%1$s">%2$s</a>.', 'yiw'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out da questo account', 'yiw'); ?>"><?php _e('Log out &raquo;', 'yiw'); ?></a></p>
  17. <?php endif; ?>
  18.  
  19. <textarea name="comment" id="comment" cols="100%" rows="10" tabindex="1"></textarea>
  20.  
  21. <?php if ( !$user_ID ) : ?>
  22. <p>
  23. <label for="author">Nome <?php if ($req) _e(" (richiesto)", 'yiw'); ?></label>
  24. </p>
  25.  
  26. <p>
  27. <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" tabindex="2" />
  28. </p>
  29.  
  30. <p>
  31. <label for="email">Mail <?php if ($req) _e(" (richiesto)", 'yiw'); ?></label>
  32. </p>
  33.  
  34. <p>
  35. <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" tabindex="3" />
  36. </p>
  37.  
  38. <p>
  39. <label for="url">Website</label>
  40. </p>
  41.  
  42. <p>
  43. <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" tabindex="4" />
  44. </p>
  45. <?php endif; ?>
  46.  
  47. <p>
  48. <input name="submit" type="submit" id="submit" tabindex="5" value="Invia Commento" />
  49. <?php comment_id_fields(); ?>
  50. </p>
  51. <?php do_action('comment_form', $post->ID); ?>
  52. </form>
  53. <?php endif; ?>
  54. </div><!-- #respond -->

Report this snippet  

You need to login to post a comment.