the dashboard for regular users doesn’t contain the same information as the admin. It very limited. You can add the following code to functions.php file. if the user is a subscriber it will redirect them to the front page and hide the menu bar.
// this will hide the menu bar from subscribers
function noSubscribeMenuBar(){
$currentUser = wp_get_current_user();
if(count($currentUser->roles) == 1 && $currentUser->roles[0] =='subscriber'){
show_admin_bar(false);
}
add_action('wp_loaded','noSubscribeMenuBar');
// this will redirect all subscribers to a given page
function redirectSubscribers(){
$currentUser = wp_get_current_user();
if(count($currentUser->roles) == 1 && $currentUser->roles[0] =='subscriber'){
wp_redirect(site_url('/'));
}
}
add_action('admin_init','redirectSubscribers');
I just typed this in so hopefully there no typos.
-
This reply was modified 5 years, 2 months ago by mrtom414.
-
This reply was modified 5 years, 2 months ago by mrtom414.
-
This reply was modified 5 years, 2 months ago by mrtom414.