comment-form.twig 1.2 KB

12345678910111213141516171819202122232425262728
  1. <div class="comment-form">
  2. <h3>Add comment</h3>
  3. <form class="comment-form" method="post" action="{{ site.site_url~'/wp-comments-post.php' }}">
  4. {% if user %}
  5. <input type="hidden" name="email" value="{{ user.email }}">
  6. <input type="hidden" name="author" value="{{ user.name }}">
  7. <input type="hidden" name="url" value="{{ user.link }}">
  8. {% else %}
  9. <label>Email<br>
  10. <input required name="email" type="email" id="email">
  11. </label>
  12. <label>Name<br>
  13. <input required name="author" type="text">
  14. </label>
  15. <label>Website<br>
  16. <input name="url" type="url">
  17. </label>
  18. {% endif %}
  19. <label>Comment<br>
  20. <textarea placeholder="Leave a comment..." name="comment" cols="60" rows="3"></textarea>
  21. </label>
  22. <input name="comment_post_ID" value="{{ post.id }}" type="hidden">
  23. <input name="comment_parent" value="{{ comment.ID|default('0') }}" type="hidden">
  24. <button type="submit" name="Submit" class="btn">Send</button>
  25. <button type="reset">Cancel</button>
  26. <p>Your comment will be revised by the site if needed.</p>
  27. </form>
  28. </div>