Tagged: comment organization
Hi Team!
I was wondering if there was a plug-in or something for the following situation I have:So we have a buddyboss private group located on our website (not the app) as you know and we have a couple posts where people comment under these posts every single day so the quantity of comments add up. For example, right now we have one post that has 2,800 comments under it! 2,800! Right now, in our group, any given posts only shows the last 3 comments, then the user has to click “view more comments” to see more comments. When the user clicks “view more comments” it displays all the comments from the very first comment, which then requires a lot of scrolling to get down to the most recent comments. Is there a way to show most recent comments? or when someone clicks “view more comments” could it bring out like 20 most recent comments at a time or any solutions for something like this?
Thank you so much! I appreciate this forum!
ColleenHi Colleen,
Thank you for the question.It’s amazing to know that single posts have that many comments. That’s wonderful.
Please allow me to look into it tomorrow and hopefully there will be a solution.
Regards
BrajeshHi Brajesh! Yes, I can even attach pics if there is a way but yeah. Okay thank you for looking into!
Have a great night (or day),
ColleenHello Colleen,
Please try the following code and check if it accomplish your requirement or not.
add_action( 'pre_get_comments', function ( $comment ) { $comment->query_vars['orderby'] = 'comment_date_gmt'; $comment->query_vars['order'] = 'DESC'; } );
Regards
RaviHi Ravi!
Thank you so much, I am going to give this to my web guy to add in and see how it goes! I will update you!
Thank you,
Colleen
You must be logged in to reply to this topic.