Show Displayname and Username together in comments
-
When a user comments on my (Buddypress-enabled) blog, the comment appears under their Displayname.
However if a user wishes to reply to them using an @-message, they need to know their Username, and this isn’t always immediately obvious. Consequently, I get a lot of users typing in the Username incorrectly, or just typing the Displayname prefixed by an @ symbol.
What I’d like to do is show both the Displayname and Username next to each comment, e.g.:
Ben (@bensmith101)
I’ve had a look in the code for comments.php and coding this seems some way beyond my abilities! Can anyone suggest how to do this?
You must be logged in to reply to this topic.
<?php
/* translators: 1: comment author url, 2: comment author name, 3: comment permalink, 4: comment date/timestamp*/
printf( __( ‘%2$s said on %4$s‘, ‘buddypress’ ), get_comment_author_url(), get_comment_author(), get_comment_link(), get_comment_date() );
?>