The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

Filter by custom fields

Topic prefix

AI Assistant
Custom badge name a...
 
Notifications
Clear all

[Solved] Custom badge name assistance

5 Posts
2 Users
2 Reactions
478 Views
(@astromono)
Posts: 7
Active Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 
[#11096]

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


 
Posted : 11/11/2025 6:47 am
Asti
 Asti
(@asti)
Posts: 8257
Illustrious Member Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Hi,

Please go to Dashboard > wpDiscuz > Phrases, open the Comment tab, and update the relevant phrases accordingly.


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 11/11/2025 1:30 pm
(@astromono)
Posts: 7
Active Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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


 
Posted : 11/11/2025 1:56 pm
Asti
 Asti
(@asti)
Posts: 8257
Illustrious Member Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

@astromono 

In this case, you should also use custom CSS code like this: 

#wpdcom .wpd-comment .wpd-comment-label span{
   white-space: wrap;
   overflow: visible;
}

In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 11/11/2025 1:59 pm
astromono reacted
(@astromono)
Posts: 7
Active Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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!


 
Posted : 11/11/2025 2:13 pm
Asti reacted