Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Change WordPress’s “Howdy” greeting by editing the existing my-account toolbar node on the wp_before_admin_bar_render action. This preserves the user name, avatar markup and account link while replacing the greeting. Update both the visible title and the submenu’s menu_title metadata so assistive technology receives the same wording.

Use the documented WordPress hook

Add this PHP to a site-specific plugin, a code-snippet manager, or a child theme when the change is theme-specific. Do not edit WordPress core files.

<?php
/**
 * Replaces the “Howdy” text in the WordPress admin toolbar.
 *
 * @global WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance.
 */
function wpdocs_replace_howdy_in_admin_bar() {
    global $wp_admin_bar;

    $my_account = $wp_admin_bar->get_node( 'my-account' );

    // Stop if another plugin or custom code changed this node.
    if ( ! isset( $my_account->title ) || ! isset( $my_account->meta['menu_title'] ) ) {
        return;
    }

    $wp_admin_bar->add_node(
        array(
            'id'    => 'my-account',
            'title' => str_replace( 'Howdy,', 'Hello,', $my_account->title ),
            'meta'  => array(
                'menu_title' => str_replace( 'Howdy,', 'Hello,', $my_account->meta['menu_title'] ),
            ),
        )
    );
}
add_action( 'wp_before_admin_bar_render', 'wpdocs_replace_howdy_in_admin_bar' );

Replace Hello, with your preferred greeting, such as Welcome, or Good morning,. The str_replace() calls leave the rest of WordPress’s original account text untouched. This pattern follows WordPress Core’s example for replacing “Howdy” in both the profile link and its ARIA label: Make WordPress Core guidance. The node update uses WP_Admin_Bar::add_node().

Why the existence checks matter

get_node( 'my-account' ) can return no usable node if another plugin, a theme, or custom code removed or replaced the account item. The checks for title and meta['menu_title'] make the callback exit safely instead of generating notices or overwriting an incomplete node.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why older admin_bar_menu snippets can fail

The admin_bar_menu hook reference allows toolbar items to be added, removed or changed, but existing nodes must be edited after they have been created. WordPress 6.6 moved creation of the account item to a much higher priority. A callback copied from an older snippet may therefore run before my-account exists.

For this specific change, wp_before_admin_bar_render avoids choosing a fragile priority and is the approach recommended in WordPress Core’s September 10, 2024 explanation. The timing change is also documented in Trac ticket #61738. If you must use admin_bar_menu for another customization, run your callback after core creates the account node and still check that the node exists.

Where to put the code

  • Site-specific plugin: keeps the greeting independent of the active theme.
  • Code-snippet manager: convenient when you do not want to create a plugin file; enable the snippet for the required admin-bar context.
  • Child theme: appropriate when the greeting is part of that theme’s design and should disappear with the theme.

Make a backup and test the administrator toolbar after activating the snippet. If the greeting does not change, confirm that the snippet is active, PHP syntax is valid, and another customization has not removed the my-account node.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

No-code alternative

The Change Howdy plugin provides a settings screen for choosing a greeting in the dashboard and front-end admin bar. Check its current maintenance status and compatibility with your installed WordPress version before installing; those details can change.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Admin Bar Editor offers broader toolbar controls, including hiding items and adding links. Its wider scope is unnecessary if you only want to rename “Howdy.”

Approach Best for What to verify
PHP callback Users comfortable maintaining a small customization Correct hook, node-existence checks and the installed WordPress version
Change Howdy plugin Users who prefer a settings screen Current maintenance and compatibility information on its WordPress.org listing
Admin Bar Editor Users needing several toolbar changes Whether its additional features are warranted for this simple rename

What the customization changes

  • The visible greeting in the top-right account link.
  • The submenu’s menu_title, which supplies the accessible label.
  • Nothing else in the account item: the username, avatar markup and destination link remain from the original node.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.