Skip to main content
Articles

Replace Howdy in WordPress 6.6.2+

Hey, it’s different now for no dumb reason. Just change the filter priority from 25 to 9992 to make the exact code work again.



/** =============================================================
 * replace WordPress Howdy in Admin Bar with Hi in WordPress 6.6+
 * or remove howdy (replace with nothing)
 */
function replace_howdy( $wp_admin_bar ) {
    $my_account = $wp_admin_bar->get_node('my-account');
    if ( isset( $my_account->title ) ) {
        $newtitle = str_replace( 'Howdy,', '', $my_account->title );
        $wp_admin_bar->add_node( array(
            'id' => 'my-account',
            'title' => $newtitle,
        ) );
    }
};
add_filter( 'admin_bar_menu', 'replace_howdy', 9992 ); // change the 25 to 9992