Notifications
Clear all

Limited Support

Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.

We appreciate your patience and understanding while our team is away. Thank you for being part of the gVectors community!

Merry Christmas and Happy Holidays! 🎄

ADJUST COMMENT LAYOUT ACCORDING TO RANK

2 Posts
2 Users
0 Reactions
2,215 Views
(@webminfo)
Eminent Member
Joined: 7 years ago
Posts: 21
Topic starter  

Hi

I've read the tutorial at here  https://mycred.me/tutorials/adjust-comment-layout-according-to-rank/#tutorial

There is a snippet code

add_filter( 'comment_class', 'insert_rank_into_comment_class', 10, 4 );
function insert_rank_into_comment_class( $classes, $class, $comment_id, $post_id )
{
	$comment = get_comment( $comment_id );
	if ( $comment->user_id == 0 ) return $classes;

	$classes[] = 'rank-' . mycred_get_users_rank( $comment->user_id, 'post_name' );

	return $classes;
}

But it does not add css class in return. Could you please check the code above and confirm it works with Wpdiscuz plugin?

Thanks



   
Quote
Arina
(@arina)
Support Team
Joined: 12 years ago
Posts: 101
 

Hi @webminfo,

Please note wpDiscuz doesn't have such a hook:

comment_class

you need to use this one instead of it:

wpdiscuz_comment_wrap_classes


   
ReplyQuote
Share:
Scroll to top