In functions file, place the following:

add_action(‘after_setup_theme’, ‘remove_admin_bar’);

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

more similar articles

When you need to direct a particular user to a certain page based on their role in WordPress, you don’t need to spend money on a redirect plugin – just put the following code in your function.php file.

n

For instance, if you want all Subscribers to be redirected to their Dashboard.

When you need to direct a particular user to a certain page based on their role in WordPress, you don’t need to spend money on a redirect plugin – just put the following code in your function.php file.

For instance, if you want all Subscribers to be redirected to their Dashboard.