Please write below code into functions.php
function drop_hide_admin_bar_settings() {
?>
<style type="text/css">
.show-admin-bar {
display: none;
}
</style>
<?php
}
function drop_disable_admin_bar() {
if (!current_user_can('administrator')) {
add_filter( 'show_admin_bar', '__return_false' );
add_action( 'admin_print_scripts-profile.php', 'drop_hide_admin_bar_settings' );
}
}
add_action( 'init', 'drop_disable_admin_bar' , 9 );
No comments:
Post a Comment