get current user first and last name wordpress

Solutions on MaxInterview for get current user first and last name wordpress by the best coders in the world

showing results for - "get current user first and last name wordpress"
Duke
17 Oct 2017
1    $current_user = wp_get_current_user();
2    
3    echo 'Username: ' . $current_user->user_login . '<br />';
4    echo 'User email: ' . $current_user->user_email . '<br />';
5    echo 'User first name: ' . $current_user->user_firstname . '<br />';
6    echo 'User last name: ' . $current_user->user_lastname . '<br />';
7    echo 'User display name: ' . $current_user->display_name . '<br />';
8    echo 'User ID: ' . $current_user->ID . '<br />';