Get rid of the default and boring login form for your customers, you can use your designed awesome login page with LoginPress.
Here is the scenario for the above situation:
Here is what you need to do:
1) First, add the following snippet in your theme’s functions.php file.
This piece of code will make sure if the user is not logged in and visits its My Account, then it will go directly to your designed login page.
function loginpress_edd_login() {
if ( ! is_user_logged_in() && is_page('my-account') ) {
wp_redirect( wp_login_url() );
exit;
}
}
add_action( 'wp', 'loginpress_edd_login' );
In the above snippet you just need to replace is_page(‘my-account‘) with your accounts page slug i.e is_page(‘my-account-slug‘)
2) Now you need to set up redirects for customers so they can redirect to their accounts page on login.
Here is where our “LoginPress Login Redirects” addon will come to action.
This is it, all done.
Easy right! Now you can show off your awesome login page to your customers.