• Resolved bonzinho

    (@bonzinho)


    Hello,
    It is possible to show the latest comments, but if, for example, the first two comments were from the same article do not show the second and show another comment from another article? that is, do not repeat comments on the same articles, but show the first 5 comments of different articles

    Thank u in advance

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    Thanks for you message. No sorry, it isn’t possible to do that with the plugin. With the way WordPress fetches comments, they just come from a ‘pool’ with all posts mixed together.

    You can exclude replies (i.e child comments) but this is done by default anyway by setting ‘threaded’ to false in the call to get_comments.

    Follow up: My previous comment about excluding replies was incorrect. By default, WordPress (see WP_Comment_Query) will show both initial comments and replies when fetching comments from the database. To exclude replies, you would need to set the parent option in the comment query to 0. To do this in our Better Recent Comments plugin, use:

    
    add_filter( 'better_recent_comments_comment_args', function( $args ) {
        $args['parent'] = 0;
        return $args;
    } );
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show comments, but no repeat from same post’ is closed to new replies.