Last updated on September 13, 2023

Disable WP Admin toolbar

Don’t know where to add this snippet? Read our guide: How to add code snippets.

Disable the WP Admin toolbar on the front end.

By default, WordPress displays a toolbar at the top of the screen when you are logged in as an administrator or editor. This toolbar provides quick access to various WordPress functions and features, but you may want to disable it for some users or on certain pages. It’s good to know that you can disable the toolbar on a per user basis. To to this, in the WP Admin area go to Users → Edit User → Toolbar and uncheck the checkbox

If you want to programmatically disable the toolbar for every user, use the following snippet:

add_filter( 'show_admin_bar', '__return_false' );

Once you have added this code snippet, the WP Admin toolbar will be disabled for all logged-in users on the front-end of your website.

Last updated on September 13, 2023. Originally posted on April 30, 2023.

Leave a Reply

Your email address will not be published. Required fields are marked *