Hi, am having problems with displaying the 5 latest comments as excerpts on a home page. I have used the following code which displays the latest 5 comments nicely, but I have trawled the codex and google to find how to reduce the content of the comments to an excerpt. I know there is get_comment_excerpt but I am not sure how to include it in the following code.
Also, I want to restrict the comments from the Feedback page to display (page id =119), is that possible?
The site is here
The code I am currently using in the sidebar is:
<li class="recentcom">
<h2>Latest Feedback</h2>
<ul class="recent-comment">
<?php
$comments = get_comments('number=4');
foreach($comments as $comm) :
$url = '<a href="'. get_permalink($comm->comment_post_ID).'#comment-'.$comm->comment_ID .'" title="'.$comm->comment_author .' | '.get_the_title($comm->comment_post_ID).'">' . $comm->comment_author . '</a>';
?>
<li>
<a><?php echo $url; ?></a>
<p><?php echo $comm->comment_content; ?></p>
</li>
<?php
endforeach;
?>
</ul>
</li>
Any help would be much appreciated.