Last updated on February 10, 2018
I would like to show you how to disable or hide the admin bar in your WordPress application. Just put the blow line of code in your current WordPress theme’s function.php
file. It will prevent the toolbar from rendering on the front end of your site.
The following lines will only display the admin bar for users with administrative privileges.
if ( ! current_user_can( 'manage_options' ) ) { show_admin_bar( false ); }
That’s it for Today.