I have created a custom login form that will use the default action of the wordpress one.
I need to display errors on it if occurs but at the moment the user will be redirected to
wp-login.php in case of errors. Also I want that users are redirected to specific page based on their role, I have two custom roles and I need to show different pages to each single role.
How I can accomplish this, will the
login_redirect filter be useful if I add it in a custom plugin?
Will a custom page added to dashboard using
add_menu_pagecan be displayed to user without a particular role, or there is another way to replace the default dashboard?