How to Change the WordPress “Howdy” Message to a Custom Welcome

Here’s a fun tip I found over at the WordPress StackExchange the other day. It’s a quick function that allows you to change the “Howdy” message that you usually see when you’re logged into the WordPress dashboard. I’ve used it to create my own custom message:

Add this to your theme’s functions.php file and customize the message:

1
2
3
4
5
6
7
8
9
10
11
12
add_filter('gettext', 'change_howdy', 10, 3);

function change_howdy($translated, $text, $domain) {

    if (!is_admin() || 'default' != $domain)
        return $translated;

    if (false !== strpos($translated, 'Howdy'))
        return str_replace('Howdy', 'Welcome', $translated);

    return $translated;
}

Replace the ‘Welcome’ with any custom greeting you like. Click save and refresh your dashboard to see the instant changes.

Comments (8)

  1. While that changes it in the backend, my frontend users still see Howdy.

    I have yet to found a fix for this, and until then you may as well use the “Edit Howdy” plugin instead.

    • This Works

      // replace WordPress Howdy in WordPress 3.3
      function replace_howdy( $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’,25 );

      • Thanks Timothy, you really helped me out with that.
        Just a warning for anyone else copying and pasting this code though you may need to replace the inverted commas as I did. This may work straight away (or it may have been messed around with like Timothy’s code by the commenting system):

        1
        2
        3
        4
        5
        6
        7
        8
        9
        10
        
        // replace WordPress Howdy in WordPress 3.3
        function replace_howdy( $wp_admin_bar ) {
        $my_account=$wp_admin_bar->get_node('my-account');
        $newtitle = str_replace( 'Howdy,', 'Hi,', $my_account->title );
        $wp_admin_bar->add_node( array(
        'id' => 'my-account',
        'title' => $newtitle,
        ) );
        }
        add_filter( 'admin_bar_menu', 'replace_howdy',25 );
  2. Hi sarah,
    (and other wordpress master)

    I’m new for wordpress,
    can you help me to change wordpress dashboard ” W ” logo

    I have tried this codes below but stil fails after putting the script on functions.php :

    function my_custom_logo() {
    echo ‘

    #header-logo { background-image: url(‘.get_bloginfo(‘template_directory’).’/images/dashblogoinvrt_16px.png) !important; }

    ‘;
    }

    Note:
    – dashblogoinvrt_16px.png = > is my own image logo (or what is the size of wordpress logo ?)
    – I use wordpress 3.5

    is there any other wordpress file to edit related to change wordpress logo?

    many thanks before

Participate