WordPress automatically displays a toolbar at the top of the page when you’re logged in.
To remove the toolbar from your site, go to Users > Your Profile. Scroll down to “Toolbar” and check “Show Toolbar when viewing site.” And that’s all you need to do. The Toolbar will no longer appear on your site.
How to disable it for all users
If you would rather remove the toolbar with code, just drop the following snippet into your functions.php file:
How to disable it with a plugin
If you want to disable it without adding a code, you can use a plugin. For example;