Answer the question
In order to leave comments, you need to log in
How to completely disable the wordpress console for subscribers?
Good day to all.
Making a blog site for one project on cms wordpress, I ran into one very significant problem. As it turned out, the console (wp admin panel) is available to all users by default and there is no function in the admin panel to disable it for subscribers. I began to google and sort through a bunch of plugins but to no avail.
Please suggest any plugin that solves this problem. I need for the subscriber to edit the profile and other interactions with the profile and account be within the front-end zone without an admin panel.
Answer the question
In order to leave comments, you need to log in
Out of the box, WP provides limited access to the admin area. But there are a lot of plugins that implement profiles / personal accounts on the frontend, in the design of the site. I googled for you .
Maybe someone else will come in handy. Solving the issue of blocking access to the WordPress admin panel for users with the role: subscriber ( subscriber ):
add_action('admin_init', function() {
if (current_user_can('subscriber')) {
wp_redirect(site_url());
die();
}
});
Put this code in functions.php and no plugin needed:
if ( current_user_can( 'subscriber' ) ) {
show_admin_bar( false );
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question