How would we restrict access to the WP admin area to all users except admins?
The users on our site have their own profile pages which do all the functions they need.
So admin should be off limits to all except admins.
How to do that?
|
|
Try the Adminimize plugin. You could also try setting access up through htaccess file |
|||||
|
|
You could write a plugin and hook into The codex actually gives an example with the feature you are looking for. http://codex.wordpress.org/Plugin_API/Action_Reference/admin_init#Example:_Access_control |
|||||
|
|
I would use WP Frontend and set it for everybody expect admins. |
||||
|
|
|||||
|
|
Put these lines in your
|
||||
|
We can hook to the This code, when pasted into your functions.php file, will display a message when a non-admin tries to access the dashboard:
If you prefer, you can provide better user experience by redirecting the user to the home page instead (the
If you want to redirect the user to their profile page, replace |
|||
|
|