Overwrite the “Howdy” Message in admin toolbar WordPress
Tweet Follow @3pixelssolution
First, we want to overwrite the “Howdy”. Add these lines in the functions.php of your theme.
[php]
function howdy_message($translated_text, $text, $domain) {
$new_message = str_replace(‘Howdy’, ‘Welcome’, $text);
return $new_message;
}
add_filter(‘gettext’, ‘howdy_message’, 10, 3);
[/php]
The above function replaces the “Howdy” with “Welcome” using the PHP str_replace function and applies the function through the WordPress own gettext filter. Once added, refresh the WordPress Dashboard and the greeting should now say “Welcome”, as shown below.