How to make instructors and students do not have access to the control panel of wordpress.?
They do not see the bar wp-admin.
Please refer :
https://wplms.io/support/knowledge-base/restrict-instructors-from-accessing-wp-admin-panel/
And students already cannot access the wp-admin section in wplms .
and when any student tries to access wp-admin then she would get this error :
http://prntscr.com/9c2je2
oh, no... :(
when I type this code in the functions.php file of my child theme, the web gives me a 500 error
function restrict_admin_with_redirect() {
if ( ! current_user_can( 'manage_options' ) && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && $_GET['type'] !='upload' ) {
wp_redirect( site_url() );
die();
}
}
add_action( 'admin_init', 'restrict_admin_with_redirect', 1 );
Fails, 500 error.
The first tutorial tells me to insert in child theme functions.php file or WP Admin - Plugins - Editor - WPLMS Customizer - wplms_customizer.php and do at the end of the file and gives me error 500
The second tutorial tells me to do it in Plugins - Editor - WPLMS Customizer - customizer_class.php but also gives me error.
I do not know what to do. But I need urgent that instructors do not have permission to view the admin bar
Thank you
You can chose any one of the above methods but not both.
There is no issue in the code.
The code would restrict all Non-Admins from accessing the Admin site.
For urgent issues it is already preferable that you share FTP credentials with us, so that we can immediately fix the issue on your site.
Ok, the credentials:
Web: http://mundoentrenamiento.com/formacion/wp-admin
USER: supportwebinar
Pass: vibe_2015
FTP:
server: mundoentrenamiento.com
user: admin_vibe
PASS: vibe_2015
Thanks
H we have added the code in your wplms-customizer.php file please check the by logging in as instructor .
Yes, although teachers do not have permissions to give anything, but if continues to be the adminbar