Those classes are being rendered inline because the id_form
, class_form
, and class_submit
parameters should be placed within the $comments_args
array (alongside title_reply
, comment_field
, etc) and not within the $fields
array. See comment_form().
Also one last question, is there any way to re-arrange the order of
the fields?
Yes, the fields can be reordered. Here’s an answer that shows how to accomplish reordering and customizing the comment fields. The main gotcha with reordering the comment fields is that if you want the main comment field to appear above the name/email/URL/etc fields, the comment_form_defaults
filter needs to be used to set $comment_field
to an empty string. This is because of how the parameters are set up; $comment_field
is special and not part of the $fields
array by default. This is covered in the answer linked above.
Related Posts:
- Why does `add_theme_support( ‘html5’, array( ‘comment-form’ )` disable client side validation?
- Add class to Reply button in Comments area
- Why does comment_reply_link launch the reply form at the wrong spot on the comment section?
- Hide comment form completely (preferably without using CSS)
- Change the tag of the comment submit button
- How to change the order of elements in comment_form()
- Threaded Comments Feature not working
- Two steps comment form
- Customize the cancel_comment_reply_link
- How to enable commenting system in WordPress
- How can I get values count from wp_commentmeta?
- customizing TwentyEleven comments template
- Insert page comment form into a modal
- Is it possible to force login for comments only on custom-post-type or the custom comment template?
- Force logged in users to still fill out name/address for commenting?
- How to add a “policy text” just before the comments? [closed]
- Enable nested comments in Theme
- Remove the function which adds nofollow to links in comments
- Wrapping the cancel_comment_reply_link()
- Commentform input area issue
- Custom markup for the comment form
- Custom comment-field form arrangement [closed]
- How to add a category to comments?
- Create customized captcha field to wordpress comment form without Plugin
- How can I remove the comment form on one or more specific pages in twenty eleven?
- wp-comment-post.php and header already sent issues
- How to create a classified section in place of comments_template
- How to send add_comment_meta value from separate file to main plugin file?
- COMMENT FORM Error: Please type your comment text
- Modify “Must be logged in to comment” text/links?
- How do I check which comment fields are required in my theme?
- Can not edit comment form
- Removing(replacing) avtar in comments.php with some other HTML arrangements
- Cannot display comment in page
- How do I write this code to not show default on label_submit?
- How to edit comments form on posts?
- How to echo PHP after comment form submit?
- Comment form not supported the image tags
- Comments template only linking to one post
- Custom comments form
- Comment_form and GD Star Rating
- In my comment form, how do I move the “notify me of follow-up comments” box above the “post comment” button?
- Add custom captcha to comment form
- Get Comment With Meta value
- Force logged-in users to fill out name and email fields for commenting?
- Is there a way to edit the markup of comment_form()?
- Comment form: Add Radio button logic [closed]
- Prefill the textarea in comment_form
- How to rearrange fields in comment_form()
- Removing the “Website” Field from Comments and Replies?
- How to add a class to the comment submit button?
- How to wrap submit button of comment form with div
- Comment Walker vs. Comment Callback
- comments reply script not working
- How to display comment form error messages in the same page
- How do I set up real anonymous posting in bbpress forums? [closed]
- How to allow the reply link to remain on the comment form after I have reached my 10 nested comment limit?
- Deep customization of the comment form?
- Custom Comments – Parent / Nested Reply
- Using filter to add additional fields to comment_form()
- Why are default comments deprecated?
- Comments Reply Form
- Does WordPress Allow Blank/Empty Comment Submissions In WordPress?
- Comment form not display properly?
- Comment form not showing up without comments
- Add a Custom Field in Comment Box AFTER text area BUT BEFORE Send button
- Programmatically block commenting by restricting view of comment form
- How to change submit button value in comment from “Post Comment” to “Send”
- How can comments be submitted when I don’t have a comment box on a page?
- Rearrange elements outputted by comment_form()
- Display comment form of specific page in sidebar
- comment_form() generates the wrong action url
- Add comments meta fields to comments metabox on post edit screen
- Custom Field Added In Comment Form Not Showing In Edit
- Am I using the right hook for removing quicktags on the admin TinyMCE?
- Display comments on a comment page without form
- How to change the order of the comment_form fields with css?
- Add a drop down list to comment form?
- Use Hooks to Limit One Comment Per User Per Post – Hide Form if Already Commented
- How To Remove The “Click here to cancel reply” Link From The WordPress Comment Form
- Custom values are not translated
- Change “logged in” link in (you must be logged in to post a comment)
- Comments form custom fields order
- changing default comment form arguments [duplicate]
- How to display the comment_form with a shortcode while removing it from its default position?
- How to Remove novalidate attribute from comment form
- Making a Comment on a page without being on that page?
- customize comment form
- Comment form vaildation
- comment_form – show all fields when logged in
- How can i customize the comment list
- Help with “text domain”, comments_form in WordPress theme
- adding a text message beside the comment submit button
- How to save new comment as custom comment type?
- Remove “at” string from wordpress comment date
- WP comments form (custom) is displaying an extra comment field
- How to modify comments form using comment_form()?
- How to add consent checkbox in comment section
- Comment `Reply` link doesn’t work if comments are loaded from ajax
- How to add enctype to multipart/form-data to comment form?