• Hello,
    I have managed to find a solution to masking the login and then creating a customised registration and login page, but I am wondering, how can I make a login redirect from the wp-login.php to say, a cart and then also prevent WP from sending emails with username and passwords for registration?
    Sorry to ask and I have no doubts the community has been asked this thousands of times, but I have been looking for a solution for days upon days and am now in a bit of whirlwind. ??
    Thank you so much in advance for any help you can offer.
    Regards
    TP

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi

    You can use below code to redirect on custom page OR cart page.

    if ( (isset($_GET[‘action’]) && $_GET[‘action’] != ‘logout’) || (isset($_POST[‘login_location’]) && !empty($_POST[‘login_location’])) ) {
    add_filter(‘login_redirect’, ‘my_login_redirect’, 10, 3);
    function my_login_redirect() {
    $location = $_SERVER[‘HTTP_REFERER’];
    wp_safe_redirect($location);
    exit();
    }
    }

    WordPress by default does not send any mail after login. There must be some third party plugin which will trigger the emails. You provably need to find the hook to disable that.

    Hope this helps!

    Thanks!

    • This reply was modified 6 years, 6 months ago by Sanket Mehta.
    Thread Starter twistedpepper

    (@twistedpepper)

    Hello,
    Thank you so much for the help, will try that and let you know.
    My apologies, I meant after registration. I need to prevent that from happening as all we want members to do is, view their cart (I’ve built front end pages) and then go from there but still be registered within the system for future bookings.
    Again, thank you.

    Hi @twistedpepper

    Let me know if you need further assistance.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Login and registration menu plus redirect.’ is closed to new replies.