Change Howdy Welcome Message on WordPress Admin Bar

Home/Change Howdy Welcome Message on WordPress Admin Bar

It’s often the small things that tend to annoy us, and in the case of one client it was the “Howdy” message on the right of the WordPress admin bar. A small thing perhaps, but how can you change it, programmatically?

Fortunately help is at hand via the following snippet which should be added to your theme or child theme’s functions.php.

// Replace Howdy Greeting
function replace_howdy_greeting( $wp_admin_bar ) {
	$my_account=$wp_admin_bar->get_node('my-account');
	$newtitle = str_replace( 'Howdy', 'Welcome', $my_account->title );
	$wp_admin_bar->add_node( array(
		'id' => 'my-account',
		'title' => $newtitle,
	) );
}
add_filter( 'admin_bar_menu', 'replace_howdy_greeting', 12 );
2017-07-07T03:25:56+00:00 July 7th, 2017|WordPress Snippets|0 Comments

About the Author:

Warren Chandler is a freelance web programmer and web developer, based in Frinton on Sea, Essex. Warren specialises in web programming, web design, corporate identity, copy writing, SEO, logo and print media for home, work, and mobile platforms.

Leave A Comment