wordpress get username
snippet in php

wordpress get username

user7187

$current_user = wp_get_current_user();
echo($current_user->user_login);