1. Home
  2. Better Recent Comments

Displaying comments for specific posts

Better Recent Comments doesn't include any options for displaying comments for specific posts, but you can achieve this by adding a code snippet to your site.

The following code can be added to a custom plugin or your child theme's functions.php file.

The code includes some example post IDs — 100, 101, 102. These should be replaced with the post IDs you wish to display comments for:

add_filter( 'better_recent_comments_comment_args', function ( $args ) {
   $args['post__in'] = [ 100, 101, 102 ]; // the post IDs to display comments for.
   return $args;
} );

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.