Forum Replies Created

Viewing 1 replies (of 1 total)
  • yfig

    (@yfig)

    My form won’t redirect after logging in.

    When I visit
    dev.toys.com

    Force Login redirects to custom login page using Profile Builder plugin form
    dev.toys.com/login

    After clicking login button same page is loaded with this in url
    http://dev.toys.com/login/?redirect_to=http%3A%2F%2Fdev.toys.com%2Ftest%2F

    instead of going to the home of dev.toys.com/

    I used the code at the beginning of post to redirect login and registration.

    // Custom Login URL
    function my_login_page( $login_url, $redirect ) {
        return site_url( '/login/?redirect_to=' . $redirect );
    }
    add_filter( 'login_url', 'my_login_page', 10, 2 );
    
    // Custom Registration URL
    function my_registration_page( $register_url ) {
        return site_url( '/register/', 'login' );
    }
    add_filter( 'register_url', 'my_registration_page', 10, 1 );

    Do I have to change anything else in this code?

Viewing 1 replies (of 1 total)