So I'm creating user registration. Just simply <?php wp_register(); ?> but then it gives them a link to the admin panel, which in my situation they really don't need. How do I remove the "Site Admin" link and redirect a subscriber if they try to access the admin panel? I guess once they log in I will need to redirect them to a certain page also.
| |||||||
feedback
|
|
So I found the answer and thought it might be useful for later viewers. Adding the code below will redirect all users that are not admin to the homepage.
The only problem with this code is that the registration needs to be changed so the user can pick their own password. | ||||
feedback
|
|
You can remove the
And, of course, you probably want to give that capability back on plugin deactivation.
Finally, you can hook into
You'll also probably want to remove the admin bar for users with a
All that as a plugin. | ||||
|
feedback
|