Last Updated: February 25, 2016
·
1.751K
· micjamking

Change 'Howdy' greeting in WordPress

Although there are plenty of plugins for changing the howdy greeting in WordPress, here is a simple solution that you can add to your functions.php to change the greeting as well.

/**
 * Custom Greeting
 */
function custom_howdy( $text ) {

    $greeting = 'Aloha';

    if ( is_admin() ) {
        $text = str_replace( 'Howdy', $greeting, $text );
    }

    return $text;
}

add_filter( 'gettext', 'custom_howdy' );

Just change the value of the $greeting variable to whatever you want and you should be good to go.

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Related Tags
#php
#wordpress
Did you know?

PHP applications still send a browser full of JavaScript. Hardening the server does not inventory the payment, analytics, and plugin scripts that run after the HTML is delivered.

Security insights from Cside