The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Share:
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 wpDiscuz community!

Merry Christmas and Happy Holidays! πŸŽ„

[Solved] display name

3 Posts
2 Users
1 Reactions
1,421 Views
Posts: 7
Topic starter
(@ngocvy)
Active Member
Joined: 4 years ago

Dear support team,

Thank you so much for your great plugin.

But I have a issue, pls help me out.

Is there anyway to show the name of author comment as display name instead of their mail'sname

as belowΒ 

image
image

2 Replies
Asti
Posts: 8202
 Asti
Support
(@asti)
Illustrious Member
Joined: 8 years ago

@ngocvy,

You should change the value of the "Display name publicly as" option. Navigate to Dashboard > Users admin page edit the user profile and change the value of the option.Β 

Display name as

The plugin just updates the first and last names, but not the value of the "Display name publicly as" option.Β 


Posts: 7
Topic starter
(@ngocvy)
Active Member
Joined: 4 years ago

add this code to function for who stuck like me

add_filter("wpdiscuz_comment_author", 'custom_comment_author', 10, 2 );
function custom_comment_author( $authorName, $commentID ) {

$comment = get_comment( $commentID );
$user = get_user_by( 'email', $comment->comment_author_email );

if( !$user ):

return $authorName;

else:

$firstname = get_user_meta( $user->ID, 'first_name', true );
$lastname = get_user_meta( $user->ID, 'last_name', true );

if( empty( $firstname ) OR empty( $lastname ) ):

return $authorName;

else:

return $firstname . ' ' . $lastname;

endif;

endif;

}


Share: