Trying to limit access to wp-admin and more
-
I am trying to hide the dashboard/panel from all my subscribers. My to-do list is as follows:
1. Redirect users back to main page after login. Accomplished this by editing wp-login.php. Would really like a non-invasive way to do this.
2. Block users from the dashboard/panel completely. As of now I have edited admin.php and added:
// Try to not allow lower users into admin area
if($user_level < 1)
{
echo "I don't belong here";
exit();
}
This seems to get the job done but I really am not understanding how user_levels and roles work right now. The site will only have me as admin and a few authors that need to access the admin panel.
3. I need to rewrite wp-amdin/profile.php so that it doesn’t redirect back to the admin panel. Haven’t started this but I don’t think it’d be too difficult. I don’t plan on hacking up the file. Just creating a new one and changing the redirects.
I guess I just am looking for a bit of advice before I dive head first into this. Any tips and/or pointing will be greatly appreaciated!
Thanks,
Matt
- The topic ‘Trying to limit access to wp-admin and more’ is closed to new replies.