WordPress at a glance

comment_id_fields() WP 1.0

Output hidden input HTML for replying to comments.

Adds two hidden inputs to the comment form to identify the comment_post_ID and comment_parent values for threaded comments.

This tag must be within the <form> section of the comments.php template.

Works based on: get_comment_id_fields()

No Hooks.


null. Nothing.


comment_id_fields( $post_id );
Post ID.
Default: current post ID


  • See: get_comment_id_fields()


Since 2.7.0 Introduced.

Code of comment_id_fields() WP 5.7.2

function comment_id_fields( $post_id = 0 ) {
	echo get_comment_id_fields( $post_id );

From category: Comments

No comments
    Log In