Template Tags/comment ID
Материал из WordPress Wiki
Содержание |
Description
Displays the numeric ID of a comment. This tag must be within The Loop, or a comment loop.
Usage
%%% <?php comment_ID(); ?> %%%
Examples
Default Usage
<p>This is comment <?php comment_ID(); ?> for all comments.</p>
Comment ID as Anchor ID
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>
Parameters
This tag has no parameters.