Last active
May 4, 2022 14:07
-
-
Save rali14/d672dd2d7c0e981fb14cefe633fed65f to your computer and use it in GitHub Desktop.
Display the username instead of first name on Account menu item
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function custom_menu_item_name () { | |
$current_user = wp_get_current_user(); | |
return $current_user->user_login; | |
} | |
add_filter( 'listify_acount_menu_user_label', custom_menu_item_name, 99 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment