The WordPress admin toolbar is not designed for the experience of members of a website community. However, you may have a membership website and do not want other users outside admin to see the wordpress admin toolbar.

how-to-disable-wordpress-toolbar-from-members-except-admin-2

Simply add the following line of code to your theme’s function.php. (It is always preferable to do this in a child theme).

add_action(‘after_setup_theme’, ‘remove_admin_bar’); function remove_admin_bar() { if (!current_user_can(‘administrator’) && !is_admin()) { show_admin_bar(false);

}

}

 

 

(wpbeginner.com)

Leave a Reply

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