Update Display Name
-
Hello.
I’m currently trying to make a “edit profile” page (WordPress + Buddypress).
But when I’m trying to update the display name something strange happens.The data gets updated, and are shown in the backend. But the username is still shown in front end and not the display name.
And this even happens if I close the browser and try again (or simply clears the cache).But if I go to the backend, and press “update user” without changing anything (since it shows the correct data) the changes takes place.
The code looks like this:
//Set display name $args = array( 'ID' => $current_user->ID, 'first_name' => 'tester', 'last_name' => 'testersen', 'nickname' => 'tester testersen', 'display_name' => 'tester testersen', ); wp_update_user( $args ); update_user_meta($current_user->ID, 'first_name', 'tester'); update_user_meta($current_user->ID, 'last_name', 'testersen'); update_user_meta($current_user->ID, 'nickname', 'tester testersen'); update_user_meta($current_user->ID, 'display_name', 'tester testersen');
And yes – I know it’s overkill, but I’m trying everything right now.
I hope someone are able to help med 🙂
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘Update Display Name’ is closed to new replies.