Display the page or post title from get_comments
-
I want to be able to show the the most recent 5 comments on my homepage. Using get_comments I can do this and show the comment, author, date etc.
<?php $comments = get_comments('status=approve&number=5'); foreach($comments as $comm) :?> <div class="index_row_entry <?=($i%2)?"color1":"color2";$i++;?>"> Post: HOW CAN I GET THIS?!<br /> Who: <?php echo($comm->comment_author);?><br /> What was said: <?php echo($comm->comment_content);?><br /> Date: <?php echo($comm->comment_date);?><br /> </div> <?php endforeach;?>
What I want to be able to do is show the title of (and link to) the post or page where the comment was made.
Any ideas?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Display the page or post title from get_comments’ is closed to new replies.