Notifications
Clear all

Remove user’s last name.

5 Posts
2 Users
0 Likes
1,829 Views
(@deyson)
Member Customer
Joined: 7 years ago
Posts: 34
Topic starter  

Hello and good day,

I had wanted to know if there was a way to only show the user's first name.  Right now it shows their first and last name when they leave a comment.

Thank you and have a great day! 🙂


   
Quote
 Tom
(@tomson)
Famed Member Admin
Joined: 9 years ago
Posts: 4168
 

Hi Deyson,

wpDiscuz doesn't show first and lt names, it shows DisplayNames. You can set any variant if DisplayName in account settings page.

More info: http://www.wpbeginner.com/beginners-guide/how-to-add-or-change-your-full-name-in-wordpress/


   
ReplyQuote
(@deyson)
Member Customer
Joined: 7 years ago
Posts: 34
Topic starter  

Thank you very much.  Do you know how to change the display name variant for all users instead of just one at a time?  

Thank you.  


   
ReplyQuote
 Tom
(@tomson)
Famed Member Admin
Joined: 9 years ago
Posts: 4168
 

Please backup the wp_users table and try this SQL in cPanel > phpMyAdmin > WordPress Database > SQL Tab:

UPDATE wp_users SET display_name = (SELECT meta_value FROM wp_usermeta WHERE meta_key = 'first_name' AND user_id = ID);

If your tables prefix is not wp_ , don't forget to change it.

However this also may not work if you have a plugin which dinamically change all names to First + last names. Make sure this issue doesn't come from other plugins.

 


   
ReplyQuote
(@deyson)
Member Customer
Joined: 7 years ago
Posts: 34
Topic starter  

Thank you, I will give this a shot.  Have an amazing day!


   
ReplyQuote
Share:
Scroll to top