Display latest comments (global) with replies on a page
Trying to display the latest 50 comments (global, from all the posts) on a page (page.php)
I am using this code:
<?php $comments = get_comments('status=approve&number=50&type=comment&hierarchical=threaded'); foreach($comments as $comment) :?> <?php $post = get_post($comment->comment_post_ID, 'OBJECT'); ?> <li> <a href="<?php echo get_permalink($comment->comment_post_ID);?>#comment-<?php echo($comment->comment_ID);?>"> <?php echo $post->post_title; ?> </a> <?php echo($comment->comment_content);?> </li> <br/> <?php endforeach; ?>
It works fine, it shows the comments, but it doesn’t show comment replies – I want to show replies too
should do the trick, but it doesn’t. maybe because
The parameter is ignored (forced to false) when $fields is 'ids' or 'counts'
But I don’t know how to fix that