Only view uername – WordPress
I want to view this code only with USERNAME, however the public display name taking over. how to only display USERNAME? function display_current_user_display_name () { $user = wp_get_current_user(); $display_name = $user->user_login; return $user->display_name; } add_shortcode('current_user_display_name', 'display_current_user_display_name');