I am trying to create a plugin what will be a sime kind of a comments archive.
I have looked at get_comment()
.
I am looking to show where the comment came from, specifically the title of the post where the comment is attached. This is part of my code:
if ( $comments ) {
foreach ( $comments as $comment ) {
// here you can display the comment in the way you want
echo 'from: ' . $comment->i want comment post title here . '<br/>';
echo '<p>' . $comment->comment_content . '</p>';
}
}
How to do this?
Here is how you do it: