Web Design & WordPress Blog

When creating a custom WordPress theme for a client, the primary focus is always on the front end of the site (as it should be), but there are also some nice tweaks we can make to the dashboard as well.

Now I’m a huge fan of WordPress but one of the things I’ve never been so keen on is the ‘Howdy’ message we see in the admin bar when logged in. It has always struck me as a little too informal, especially when developing a business website. Also, here in the UK ‘Howdy’ just isn’t a word we use. In fact, not so long ago while running though the WordPress admin area with a client, one of the first things they noticed when we logged in was being greeted with ‘Howdy’ rather than more the traditional ‘Welcome’ or ‘Hello’.

Something a little more suitable

Soon after this particular client meeting, I found myself searching around for a simple way to change this to something more suitable for a professional, business website. As luck would have, it I came across a nice little function which produced the exact result I’d been looking for.

Goodbye ‘Howdy’

All we need to do here is paste the following snippet of code into our themes functions.php file.

// Replace WordPress Howdy in admin bar
function replace_howdy( $wp_admin_bar ) {
$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',25 );

In the example above I’ve replaced ‘Howdy’ with ‘Welcome’ (on line three of the function code), but you can replace it with whatever you like to suit your needs.

As always, make sure you take a back up of your functions.php file before making any changes in case you need to revert back it.

If you are using a child theme you will need to create a new functions.php file, paste in the code then upload it to your child theme folder.

DiscussionLeave a comment

  1. Max says:

    Thank you, I have been looking for a simple way to do this on a couple of my WordPress sites for ages and yours is the best solution I’ve located so far.