Basic implementation:
- Create a page for the frontend (and optionally a template).
- Then add the following code to your
functions.php
:
function login_redirect_capability() {
if ( current_user_can('author') || current_user_can('editor') ){
return 'url-of your custom page';
}
}
add_filter('login_redirect', 'login_redirect_capability');
This will redirect them to the page you created. If you want to recode the dashboard as in the WordPress admin backend, you can look at the code in this plugin to see how it’s done. However, if you’re new to this, I highly suggest against that. An alternative to a backend dashboard would be something like this.
If you have a site that requires members I suggest looking into using a membership plugin which would make that a whole lot easier.