Notifications
Clear all
Topic starter
11/07/2018 6:09 am
In order to keep our users private, we'd like to only show the users first name when the post in the form on memberium. Is there a setting I can use to change this?
11/07/2018 5:55 pm
Hi lisa@EW,
I'm sorry, but I don't follow you. Please explain using some screenshots.
Topic starter
11/07/2018 6:06 pm
HI Astghik thans for responding!
I've attached a screen shot.
12/07/2018 3:54 pm
Hi lisa@EW,
I'm sorry, but wpDiscuz doesn't have such an option. You need to use the following code. Put it in your current active theme function.php file:
add_filter('wpdiscuz_comment_author', 'custom_comment_author_name', 10,2);
if (!function_exists('custom_comment_author_name')) {
function custom_comment_author_name($authorName, $comment){
if (strpos($authorName, ' ') !== false) {
$authorNameData = explode(' ', $authorName);
$authorName = $authorNameData[0];
}
return $authorName;
}
}