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! 🎄
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
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
