Languages: English • 日本語 (Add your language)
Retrieve the excerpt of the current comment.
Will cut each word and only output the first 20 words with '…' at the end. If the word count is less than 20, then no truncating is done and no '…' will appear.
<?php get_comment_excerpt( $comment_ID ); ?>
<?php $excerpt = get_comment_excerpt( 7 ); echo '<p>Latest comment: ' . $excerpt . '</p>'; ?>
get_comment_excerpt() is located in wp-includes/comment-template.php