Languages: English • Türkçe • 日本語 (Add your language)
Displays the numeric ID of the current comment. This tag must be within The Loop, or a comment loop.
Use get_comment_ID to retrieve the value.
<?php comment_ID(); ?>
This function does not accept parameters
see get_comment_ID() for Echoes Result
<p>This is comment <?php comment_ID(); ?> for all comments.</p>
Uses the comment ID as an anchor id for a comment.
<div id="comment-<?php comment_ID() ?>">Comment by <?php comment_author() ?>: </div> <div class="comment-text"><?php comment_text() ?></div>
Since: 1.5.0
comment_ID() is located in wp-includes/comment-template.php