How to Remove WordPress 'Howdy, User' from WordPress AdminBar
This article was initially published on the WPSandbox blog at - https://wpsandbox.net/linkedin1535
After the user logs into WordPress, they will see the top admin bar. It has lots of menu opens depending on the currently logged in user's role.
One of the things that is really not necessary is the Howdy text shown in the top right corner.
he following code can be used to remove the howdy text. This would work if the site is in English. If you're using a different language feel free to add other options separated by the pipe character. The fix is nice because it also removes exclamation and spaces so it makes it cleaner.
Make sure you package this php code as a plugin. You can use our Free WordPress Plugin Generator as well.
You can of course add this to your functions.php file but you'll have to remove the <?php tag as there's such tag already.
How it works is it gets the menu element with internal id: my-account and then uses php regular expression to modify the title and then it adds it as a new node but because we're passing the id it overrides the previous entry.
Having less things in the menu makes it cleaner and more professional.
Entertainment & Music Marketing
8moGreat post Slavi!
Computer Software/Firmware Consultant, Website Dev, Medical Devices, Expert Witness
8moYes, the Howdy message is unnecessary and removing it certainly makes the menubar cleaner. However, you may have a need to put some kind of static marking there, so using this function could be used for that, at the risk of making the menubar "unclean" again.