Remove WordPress Logo from Admin Toolbar

Every time you log in to your WordPress admin panel you must have seen the WordPress logo at the top left hand corner of the screen. When you hover your mouse on the top of the logo you would see bunch of menu items like Documentation, Feedback etc. shows up which I find to be not so important.

So, if you want to remove that little WordPress logo and the menu items, simply add the following snippet on your theme’s functions.php file and update it.

function wp_logo_remove() {
   global $wp_admin_bar;
   $wp_admin_bar->remove_menu('wp-logo'); }
add_action('wp_before_admin_bar_render','wp_logo_remove', 0);

All we are doing here is creating a function which is being hooked up with the wp_before_admin_bar_render action. This action can modify wp_admin_bar object before it renders the admin toolbar. So we are asking it to remove the WordPress logo from the admin bar, that’s all.

Source: WordPress Developer Resources.

Today In History



Leave a Reply

Note: Convet HTML, PHP, JavaScripts from HTMLify, before posting from comment section.
License: By submitting a comment here you grant this site a perpetual license to reproduce your words and name/Web site in attribution. Please use your real name or a pseudonym (i.e., pen name, alias, nom de plume) when commenting. If you add your site name, company name, or something completely random, I'll likely change it to whatever I want.