• Resolved daveporter

    (@daveporter)


    General Question:

    I have setup the plugin, it is primarily just for Subscribers to gain access.

    But I notice, after a session when they logout, if they log back in, they are on the profile page, which is not logical, I looked in the settings but nothing obvious jumped out – how can I ensure they log back in to the home page ?

    TIA, Dave

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Omar ElHawary

    (@omarelhawary)

    Hi @daveporter,

    Thanks fo reaching out Members Support Team!

    Is issue related to login or logout as I didn’t got where is the issue come from? Please elaborate more about the issue and how to replicate it from my end so I can provide porper help.

    Looking forward to hearing back from you.

    Regards,

    Thread Starter daveporter

    (@daveporter)

    Thanks Omar,

    I actually found a solution.

    I installed this plugin:

    https://www.ads-software.com/plugins/wp-login-and-logout-redirect/

    That allows me to add a URL to the login and logout, so members of the site who have to login never end up on their profile page – there is only one user account for members of this site to access!

    Dave

    I was also looking for a solution to this problem. The Members plugin will display a message to indicate you don’t have permission to access this page if the page is restricted. If they get this message because they are not logged in, I want to give them a link to the login page and then redirect them back to the original page after login. I created the following code snippet to do this:

    add_filter('members_post_error_message', 'my_login_redirect', 10, 1);
    function my_login_redirect( $error_msg ) {
    if (!is_user_logged_in()) {
    $current_url = home_url( add_query_arg( [], $GLOBALS['wp']->request ) );
    $url = esc_url( wp_login_url( $current_url ) );
    return '<div class="members-access-error"><b>Please <a href="' . $url . '">Log in</a> to access this page.</b></div>';
    }
    return $error_msg;
    }
    Plugin Support Omar ElHawary

    (@omarelhawary)

    Thanks for sharing @joneiseman!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.