WordPress dashboard offers user the opportunity to choose whether their name is output as Firstname Lastname or several other options with Firstname Lastname order the default.
I would like that default changed to Lastname Firstname.
Can anyone suggest how it can be done?
AFAIK the default option in the display name dropdown is set to the current value of user display name.
So, if we on user creation set
display_name
to “Lastname Firstname”, then this will be used as default.This can be done hooking
user_register
:However, that will affect the name shown on frontend, on backend, in list table of users, under “Name” column, we’ll still see “Firstname Lastname”.
That can be changes, using the filter ‘manage_users_columns’ and ‘manage_users_custom_column’, in a way that we replace the default ‘name’ column with a custom one showing the
display_name
field: