• Resolved fruitpunchdigital

    (@fruitpunchdigital)


    I have a WordPress membership website where users progress through 5 stages: Decide, Design, Drive, Deliver, and Multiply. Each stage has its own dedicated dashboard page.

    When a user logs in, I want them automatically redirected to the dashboard that matches their current stage. I also want users to be able to switch between stages from within their dashboard, which should save their selection and immediately redirect them to the corresponding dashboard.

    Current Setup:

    • WordPress with Elementor Pro, Ultimate Member, and Advanced Custom Fields
    • 5 dashboard pages, one per stage
    • Stage preference stored against the user’s profile via the meta key user_stage

    The Goal:

    • On login → redirect user to their stage dashboard automatically
    • On stage switch → save the new stage to their profile AND redirect in one click
    • Only the relevant dashboard is accessible/visible at any time

    What I have so far:

    • The 5 dashboard URLs are mapped to their stage keys (decide, design, drive, deliver, multiply)
    • A PHP snippet using um_login_redirect_url to handle login redirection based on user_stage
    • Elementor Pro Forms on each dashboard to handle the stage switch and save to user meta

    What I need help with: Getting the full flow working reliably end-to-end with minimal custom code.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Yurii

    (@yuriinalivaiko)

    Hello @fruitpunchdigital

    It would be simpler if you used the role mechanism to create stages. Since stages are just meta, you’ll need to customize redirects using hooks and your own code.

    Use the um_login_redirect_url hook to override the value of the “Set Custom Redirect URL” user role setting. See the settings documentation here: https://docs.ultimatemember.com/article/103-user-roles-settings#login-options

    Code example:

    function my_login_redirect_url( $url, $user_id ) {

    // Set redirect URLs for stages here:
    $urls = array(
    'decide' => '/decide/',
    'design' => '/design/',
    'drive' => '/drive/',
    'deliver' => '/deliver/',
    'multiply' => '/multiply/',
    'test' => '/account/',
    );

    $user_stage = get_user_meta( $user_id, 'user_stage', true );
    if( $user_stage && ! empty( $urls[ $user_stage ] ) ) {
    $url = esc_url( $urls[ $user_stage ] );
    }

    return $url;
    }
    add_filter( 'um_login_redirect_url', 'my_login_redirect_url', 10, 2 );

    A hook you should use to redirect after the stage switch depends on the way you change the stage.
    If you use a custom field in the profile form for this, then you should use the um_update_profile_redirect_after hook to customize redirect after the profile update.
    If you use the Elementor Forms for this, then you should use a hook that fires after the Elementor Forms submit.

    Regards

    Plugin Support Yurii

    (@yuriinalivaiko)

    Hi fruitpunchdigital,

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help.

    Regards

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

You must be logged in to reply to this topic.