Subscribe On YouTube

Join other subscribers and enjoy other Divi video tutorials!

How To Remove The Word “Howdy” From The WordPress Admin Bar In Divi

Nelson Miller Profile Orange
In this tutorial I will show you how to remove the word "howdy" from before the username in the WordPress admin bar in Divi.

In WordPress, when a user is logged in, the admin bar in the top right corner of the screen greets the user with “Howdy, [Username].” It’s great that WordPress is so friendly! But personally, I find it a little odd, and it takes up precious real estate in the admin bar. It’s a simple thing, and it doesn’t make much difference, but sometimes little things are important too. So I thought I would show you how to remove this on your Divi websites. In this tutorial, I will show you how to remove the word “howdy” from before the username in the WordPress admin bar in Divi.

Add A PHP Code Snippet To Remove Howdy From The WordPress Admin Bar

The quick and simple way to do this is with the PHP code snippet below. We have instructions in the toggle below for where to paste PHP code if you are not familiar with it. Just remember to be careful, as PHP can cause issues if not implemented properly. After adding this snippet to your site, you can refresh the page and the word “howdy” should be removed from the admin bar.

Where To Paste The PHP Code

1. Divi Assistant
If you are using our Divi Assistant plugin, simply paste the code in the PHP tab in the custom code window in the Divi Visual Builder.

2. Child Theme
If you are using a child theme, paste this code into the functions.php file. If you don't have a child theme, you can generate a child theme directly on your site or download our free child theme.

3. Code Snippet Plugins
Otherwise, install a dedicated code snippet plugin, create a new snippet, and paste this code into the PHP code editor.

If you need help understanding where to paste the code, please check out our complete guide about where to add custom PHP code snippets in Divi.

/**
 * Customize the user name displayed in the WordPress admin bar.
 */
function pac_da_custom_admin_bar_user_name() {
    global $wp_admin_bar;

    // Define the ID of the node representing the "My Account" section in the admin bar.
    $node_id = 'my-account';

    // Check if the specified node exists in the admin bar.
    if ($wp_admin_bar->get_node($node_id)) {
        // Get the current title of the "My Account" section.
        $current_title = $wp_admin_bar->get_node($node_id)->title;

        // Split the current title into an array based on the comma and space separator.
        $newTitle = explode(", ", $current_title);

        // Update the "My Account" section title with the second part of the split title if available, 
        // otherwise keep the current title.
        $wp_admin_bar->add_node(array(
            'id' => $node_id,
            'title' => isset($newTitle) && isset($newTitle[1]) ? $newTitle[1] : $current_title,
        ));
    }
}

// Hook the custom admin bar user name function to run before the admin bar is rendered.
add_action('wp_before_admin_bar_render', 'pac_da_custom_admin_bar_user_name');

Code Explanation

This code snippet removes the word “Howdy” from the WordPress username in the admin bar.  This function modifies the greeting by removing the “Howdy” part, leaving just the username visible in the admin bar. It achieves this by intercepting the rendering of the admin bar and adjusting the displayed username accordingly.

how to Remove “Howdy” From Before user Name In Admin Bar using the Divi Assistant plugin

Subscribe For More Things Like This!

At the start of each month, we send out a recap newsletter from the month before with family news, Divi news, our latest tutorials, and product news. Occasionally, if the news is too exciting to wait, we will send out another email separate from the monthly newsletter. That’s what you get when you subscribe, and of course you can unsubscribe if you are no longer interested!

Blog Post Optin
Divi Logo (2)

Shop Our Divi Products

Plugins • Courses • Templates

Visit The Shop

Featured Products

Asset 4

New! Trail Guides

Follow a series of blog posts carefully arranged around a specific topic or goal! Keep track of your progress by marking posts completed, just like a free course!

View Trial Guides

Divi Tutorials On YouTube

Our videos have views! Join subscribers and enjoy over video tutorials!

Visit Our Channel

Leave A Response!

By commenting you agree to our Blog & YouTube Comments Policy

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Recent Posts

Shopping cart0
There are no products in the cart!
You may be interested in…
$19.00$22.50

Select options This product has multiple variants. The options may be chosen on the product page

$16.50$24.00

Select options This product has multiple variants. The options may be chosen on the product page

$16.50$24.00

Select options This product has multiple variants. The options may be chosen on the product page

$19.00$24.00

Select options This product has multiple variants. The options may be chosen on the product page

$20.50$24.00

Select options This product has multiple variants. The options may be chosen on the product page

Graphic showcasing Divi Assistant features and toolset.
From: $69.00 / year

Select options This product has multiple variants. The options may be chosen on the product page

Divi Search Helper Plugin By Pee Aye Creative
From: $29.00 / year

Select options This product has multiple variants. The options may be chosen on the product page

Continue shopping
0