How to Remove Logo from WordPress Admin Bar

To remove the logo from the WordPress admin bar, you can use CSS to hide or disable it. Here’s how you can achieve this:

1. Open the theme’s functions.php file in your WordPress theme directory.
2. Add the following code to the file:

// Remove logo from WordPress admin bar
function remove_admin_bar_logo() {
    echo '<style>
        #wpadminbar #wp-admin-bar-wp-logo {
            display: none !important;
        }
    </style>';
}
add_action('wp_head', 'remove_admin_bar_logo');

 

3. Save the changes and upload the modified functions.php file back to your server.

This code adds an inline CSS style to hide the logo element in the WordPress admin bar. The `#wp-admin-bar-wp-logo` selector targets the logo element specifically.

After making these changes, the logo in the WordPress admin bar will be hidden or removed. Please note that this solution affects the visual display only and does not disable any functionality related to the logo.

 

 

To remove the logo from the WordPress admin bar using the `remove_node` method, you can use the `admin_bar_menu` hook along with the `remove_node` function. Here’s how you can achieve this:

1. Open the theme’s functions.php file in your WordPress theme directory.
2. Add the following code to the file:

 

// Remove logo from WordPress admin bar
function remove_admin_bar_logo($wp_admin_bar) {
    $wp_admin_bar->remove_node('wp-logo');
}
add_action('admin_bar_menu', 'remove_admin_bar_logo', 999);

 

3. Save the changes and upload the modified functions.php file back to your server.

This code uses the `admin_bar_menu` hook to modify the WordPress admin bar menu. The `remove_node` function is used to remove the node with the ID `’wp-logo’`, which represents the logo element in the admin bar.

After making these changes, the logo in the WordPress admin bar will be removed.

Please note that this solution removes the logo element from the admin bar completely, including its functionality and any associated sub-menus.

 

Related Blogs

Adding Sidebar In WordPress Theme

Adding a sidebar to a WordPress theme involves modifying the theme files and registering a new sidebar area using WordPress functions. Below are the general steps to add a sidebar in WordPress themes:

Request A Quote

Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.