Skip to main content
Login Join
Snippet · PHP

Disable the WordPress Admin Bar for All Users

Shared by Amit Dholiya · May 22, 2026

8 views
Back to Snippets

The WordPress admin bar appears at the top of the website when users are logged in. If you don’t need it on the frontend, you can disable it.

Steps

  1. Open your WordPress theme functions.php file.
  2. Add the code below at the end of the file.
  3. Save the file.
  4. Refresh your website.

Done — the admin bar will no longer appear on the frontend for logged-in users.

show_admin_bar(false);
Know a different way to do this? Add your approach as a variation so folks can compare them side by side.
Submit a variation

0 comments