Hello
I’m trying to customize a badge name for a user role. I created this code snippet which is supposed to change the badge name for the "S2member level3" user role to "Fundador":
add_filter( 'wpdiscuz_user_label', function( $label, $comment ) {
if ( empty( $comment->user_id ) ) {
return $label; // guests or unknown user
}
$user = get_userdata( (int) $comment->user_id );
if ( $user instanceof WP_User && in_array( 's2member_level3', (array) $user->roles, true ) ) {
return 'Fundador';
}
return $label;
}, 10, 2 );
The problem is the badge just says "Member" and it’s not changing the color according to my settings either.
Any assistance you can provide would be greatly appreciated.
Thanks,
Luis
Hi,
Please go to Dashboard > wpDiscuz > Phrases, open the Comment tab, and update the relevant phrases accordingly.
Thank you very much, Asti!
On a side note, I see that my labels for commenters get cut off after a few characters. Is there a way to make the complete label name show up?
In my case, the label should read "Miembro Fundador", but in the website below you see it gets cut off at "Miembro…"
https://www.astromono.com/gta6-atrasado-a-noviembre-2026/#comments
I was able to change the color of the label using custom CSS.
Thanks!
Luis
Thank you so much Asti! It now looks great!!! I’ll keep tweaking the font sizes a bit, but you can mark this topic as SOLVED! Have a great week ahead!

