Wordpress: Replace "howdy" in wordpress admin to your own message

function change_howdy( $wp_admin_bar ) { $grabHowdy=$wp_admin_bar->get_node('my-account'); // Replace Howdy with our own message eg. 'Welcome back,' $welcome = str_replace( 'Howdy,', 'Welcome back,', $grabHowdy->title ); $wp_admin_bar->add_node( array( 'id' => 'my-account', 'title' => $welcome, ) ); } add_filter( 'admin_bar_menu', 'change_howdy', 25 );
This handy snippet replaces the default "Howdy" which welcomes users when they're logged into the admin. You may wish to change this to a more professional, welcoming message for certain clients perhaps.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.