comment_form

comment_form ( $args = array(), $post_id = null )

Parameters:
  • (array) $args Options for strings, fields etc in the form
  • (mixed) $post_id Post ID to generate the form for, uses the current post if null
Returns:
  • (void)
Defined at:

Description

Outputs a complete commenting form for use within a template.

Most strings and form fields may be controlled through the $args array passed into the function, while you may also choose to use the comment_form_default_fields filter to modify the array of default fields if you'd just like to add a new one or remove a single field. All fields are also individually passed through a filter of the form comment_form_field_$name where $name is the key used in the array of fields.

Related Functions

comment_form_title, comment_author, meta_form, comments_rss, comment_time

Top Google Results

User discussions

wpseek mobile