• Resolved olivierpages

    (@olivierpages)


    Hello

    I installed your plugin which looks great with many options to set.

    But I am looking for a way to avoid the user to be redirected to its dashboard after login.

    I use a Membership plugin (Memberpress) which settings are now overridden by Directorist.

    Can you provide a custom code to add to my functions.php file of my child’s theme in order to avoid the redirection to the user dashboard?

    Thank you for your help

    Very best

    Oli

Viewing 1 replies (of 1 total)
  • Hi Oli,
    Please put the code at your child theme’s functions.php file to avoid the redirection.

    function custom_redirection($redirect_to, $requested_redirect_to, $user) {
        return $requested_redirect_to;
    }
    add_action( 'login_redirect', 'custom_redirection', 10, 3 );
Viewing 1 replies (of 1 total)
  • The topic ‘avoiding redirection to dashboard’ is closed to new replies.