Hi keesiemeijer,
I tried from the above plugins in roles and capabilities, there is no option where i can hide ‘wp-admin’ from others please help me
Thanks
Harsha
It should work like this.
When user type ‘example.com/wp-admin’ it should redirect to ‘example.com’
Only when Super admin login from front end he should be able to see the backend Dashboard.
Is there any way to do this please help me.
Thanks
Harsha.
Try it with this in your theme’s functions.php:
//redirect all non admin to front site
add_action('admin_init','redirect_nonadmin');
function redirect_nonadmin(){
if (!is_super_admin()) {
wp_redirect( home_url() ); exit;
}
}
I am sorry where inside theme should i have to paste this ?? is it in functions.php ??
Please help me
Thanks
Harsha.
I am sorry, It is not working again, I have given a user role as a subscriber if he type “example.com/wp-admin”
It throws
“Error
Unfortunately, you can not get into the author panel, because the site admin does not set it up.
ยป Log out”
I want just the user to redirect to example.com page
Please Help.
Thanks
Harsha.
This i have already tried keesiemeijer, i am so sorry ๐
Nothing is working for me here ๐
Thanks
Harsha.
No, i tried this now, I am unable to login it just redirect the page that is it ๐
Thanks
Try removing the plugin by using FTP or whatever file management application your host provides.
Which Plugin you want me to remove ??
Thanks
Harsha.
If i disabled ‘hide-login’ plugin, I am able to login.
Thanks.