Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact
You are here: Home

Sunshine

  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • June 5, 2018 at 1:58 am in reply to: How to redirect when user is logged in & on login page #14613
    Sunshine
    Participant

    Thanks for the explanation.
    I would like to create some secret pages for different level of users.
    User has to visit the login page again because I don’t want to reveal the link of the page that members of different levels will be redirected to.
    Therefore I didn’t create any link to the secret pages at the login page which is the entrance of the member only area.

    Once the member is logged in, I hope the user will be redirected to a specific page when he visits the login page again.
    Would it be possible to do that ?

    June 4, 2018 at 11:47 pm in reply to: How to redirect when user is logged in & on login page #14611
    Sunshine
    Participant

    yes, it works well when the user log in for the first time.
    But when the member is logged in and access the login page again, only the user details (loggedin.php) were shown.
    The user has not been redirected to the designated page.

    June 4, 2018 at 4:58 pm in reply to: How to redirect when user is logged in & on login page #14608
    Sunshine
    Participant

    May I know if the following code is correct if I want to redirect the members of a particular member level to the designated page? I am going to add the following code in loggedin.php.

    <?php
    if (SwpmMemberUtils::is_member_logged_in()) {
    $member_level = SwpmMemberUtils::get_logged_in_members_level();
    if ($member_level == “2”) {
    wp_redirect( ‘URL’ );
    exit;}
    }
    ?>

    June 4, 2018 at 3:53 pm in reply to: How to redirect when user is logged in & on login page #14607
    Sunshine
    Participant

    Thank you for your reply.

    For example, When a member logs in for the first time from the login page,
    he was redirected to the designated page successfully after login.
    Then while the member is logged in and accesses the login page again,
    he was not redirected to the designated page.
    So he entered the username and password again but he was not redirected to the designated page neither.

    My question is how can I redirect the logged member to the designated page when he accesses the login page again?
    For your information, I am using the following code on the login page.

    <form id=”swpm-login-form” action=”” method=”post” name=”swpm-login-form”>
    <div class=”swpm-login-form-inner”>
    <div class=”swpm-username-label”><label class=”swpm-label” for=”swpm_user_name”>Username or Email</label></div>
    <div class=”swpm-username-input”><input id=”swpm_user_name” class=”swpm-text-field swpm-username-field” name=”swpm_user_name” size=”25″ type=”text” value=”” /></div>
    <div class=”swpm-password-label”><label class=”swpm-label” for=”swpm_password”>Password</label></div>
    <div class=”swpm-password-input”><input id=”swpm_password” class=”swpm-text-field swpm-password-field” name=”swpm_password” size=”25″ type=”password” value=”” /></div>
    <div class=”swpm-remember-me”><span class=”swpm-remember-checkbox”><input name=”rememberme” type=”checkbox” value=”checked=’checked'” /></span>
    <span class=”swpm-rember-label”> ログイン情報を保存</span></div>
    <div class=”swpm-before-login-submit-section”></div>
    <div class=”swpm-login-submit”><input class=”swpm-login-form-submit” name=”swpm-login” type=”submit” value=”Login ログイン” /></div>
    <div></div>
    <div class=”swpm-forgot-pass-link”>パスワードを忘れた?</div>
    <div class=”swpm-login-action-msg”></div>
    </div>
    </form>

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
Next Page »

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy