Skip to content
Prem Tiwari
  • WP Tutorials
  • Plugins
  • About Me
  • Featured On
  • Let’s Talk
Prem Tiwari
Home / WordPress Tutorials / How to Disable WordPress Admin Bar for All Users

How to Disable WordPress Admin Bar for All Users

ByPrem Tiwari Last updated onSeptember 1, 2023

The WordPress admin bar is a convenient toolbar that provides quick access to various admin functions while browsing your website. While it can be quite helpful for administrators and editors, some website owners might prefer to disable the admin bar for all users. Whether you want to streamline the user experience or maintain a cleaner frontend design, this blog post will guide you through the process of disabling the WordPress admin bar for all users.

Step 1: Access Your Theme’s Functions.php File To disable the admin bar, you’ll need to add a code snippet to your theme’s functions.php file. This file contains functions and code that define the behavior of your WordPress theme. To access it, follow these steps:

  1. Log in to your WordPress dashboard.
  2. Navigate to “Appearance” and select “Theme Editor.”
  3. On the right-hand side, find and click on the “Theme Functions” (functions.php) file.

Step 2: Add the Code Snippet Inside the functions.php file, you need to add the following code snippet:

// Disable admin bar for all users
add_filter('show_admin_bar', '__return_false');

This code uses the add_filter function to modify the behavior of the admin bar. The show_admin_bar filter is set to return false, effectively disabling the admin bar for all users.

Step 3: Save Changes After adding the code snippet, make sure to save the changes to the functions.php file. Click the “Update File” button at the bottom of the editor to save your modifications.

Step 4: Clear Cache If you’re using a caching plugin or a Content Delivery Network (CDN), it’s recommended to clear your cache to ensure that the changes take effect immediately.

Step 5: Verify the Admin Bar After completing the steps above, open a new browser window and navigate to your website. You should no longer see the WordPress admin bar at the top of the page. This change will apply to all users, including administrators.

Found it helpful? Share it with your friends on social media!

  • Facebook
  • Post on X
  • LinkedIn
Post Tags: #Admin#WordPress
Prem Tiwari

Prem Tiwari is a passionate advocate of open source technology, with over 10+ years of experience in the WordPress domain. He has great experience when it comes to scaled WordPress projects which caters the need for big enterprise clients on WordPress and WordPress VIP-GO platform.

Facebook Twitter Instagram YouTube Linkedin

Post navigation

Previous Previous
How to disable file editing in the WordPress dashboard
NextContinue
Extra Fee on cart for WooCommerce

Collections

  • Crawling and indexing
  • Meetup
  • PHP
  • Plugins
  • SEO
  • Tech Talks
  • WooCommerce Tutorials
  • WordCamp
  • WordPress Tutorials
  • Privacy
  • Cookies
  • Disable Update Notifications
Facebook Twitter Instagram YouTube Linkedin WordPress
Scroll to top
  • WP Tutorials
  • Plugins
  • About Me
  • Featured On
  • Let’s Talk