Creating a Minimalistic Admin Bar in WordPress

In this quick tutorial, we’re going to simplify the WordPress admin bar. To be more clearer, you can remove unnecessary items like the WordPress logo, site name, updates, comments, and even your account section for a cleaner, minimalistic look.

To achieve this, copy the code snippet provided below and add it to your child theme’s functions.php file, or use a plugin like ‘Code Snippets’ to apply it.

// Remove multiple items from the admin bar
function ts_remove_admin_bar_items() {
    global $wp_admin_bar;

    // Remove the specified items
    $wp_admin_bar->remove_node('wp-logo');      // WordPress logo
    $wp_admin_bar->remove_node('site-name');     // Site name
    $wp_admin_bar->remove_node('updates');        // Updates
    $wp_admin_bar->remove_node('comments');       // Comments
    $wp_admin_bar->remove_node('new-content');    // Add new content
    $wp_admin_bar->remove_node('my-account');     // User profile and logout
}
add_action('admin_bar_menu', 'ts_remove_admin_bar_items', 999);