WordPress Admin Bar Removal

If you do not want members of your site to see the Admin Bar, you can do this by adding the code below to the bottom line of your theme’s functions.php file.

Admin Bar Removal For All Users Except Admin

/* Uninstall the Admin Bar - Excluding Admin */
add_action('after_setup_theme', 'remove_admin_bar');

function remove_admin_bar() {
if (!current_user_can('administrator') && !is_admin()) {

Admin Bar Removal for All Users Including Admin

/* Admin Bar Removal - Including Admin */

Benzer Yazılar

Leave a Comment