Admin & Dashboard PHP Beginner

Remove the WordPress Logo From the Admin Bar

Remove the WordPress logo menu and its links to WordPress.org from the top-left of the admin bar.

Tested on WordPress 7.1 PHP 8.3 No plugin needed Updated
functions.php 3 lines
add_action( 'admin_bar_menu', function ( WP_Admin_Bar $bar ): void {
	$bar->remove_node( 'wp-logo' );
}, 999 );

Where to add this

Recommended A code snippets plugin Survives theme changes and is easy to switch off.
Child theme At the end of your child theme's functions.php file.
Must-use plugin As a .php file in wp-content/mu-plugins, starting with <?php.

Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.

The WordPress logo menu links to WordPress.org, its documentation and support forums. Clients rarely need those links, and white-labelled sites look cleaner without them.

How it works

The logo menu is the admin bar item with the id wp-logo. Removing it late on admin_bar_menu takes the logo and all its sub-links away, in wp-admin and on the front end.

Things to watch

  • Nothing else changes. “About WordPress” is still available at /wp-admin/about.php.

How to test it

Reload any page with the admin bar. The WordPress logo should be gone from the top-left.

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only