redirect following admin login not working

Home Forums Pie-Register 2.0 Support redirect following admin login not working

This topic contains 1 reply, has 2 voices, and was last updated by  PIE REGISTER 3 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2948

    mary gallagher
    Participant

    I’m using pie-register to sign up artist members and return them to an artist-page once a login is complete. For admin users I have an admin-page that uses wp_login_form{} with a redirect back to the admin-page once login is complete. However, since I installed pie-register, admin users end up in the dashboard. I have tried using [pie-register-login] on the admin-page to see if I can get admins at least redirected to the artist-page, but admins still end up in the dashboard. Is there a hook I can use to redirect admins? Or is there a [pie-register-login] parameter I can use? My login code for admins is:
    $redirect = esc_url(home_url(‘/admin-page/’)) ;
    $args = array(‘redirect’ => $redirect);
    wp_login_form($args);
    Thanks.

    #2950

    PIE REGISTER
    Keymaster

    Hello,

    You can pass ‘redirect_to’ parameter, PR will follow the parameter URL
    first.
    The URL in parameter should be encoded.
    i.e:
    http://example.com/wordpress/pie-register-login/?redirect_to=https%3A%2F%2Fexample.com%2Fwordpress%2Fmy-account%2F

    Hope it helps

    Thanks
    Mohsin

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.