• Resolved chelminski

    (@chelminski)


    Hi ??
    Once the user is logged in, they can still view the registration page. I would like the registration page to be unavailable to the logged in user, just as the login page is unavailable.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Muhammad Arslan

    (@wparslan)

    Hey @chelminski

    By default LoginPress follows the WordPress login page structure and flow.

    However, i can provide you a custom code which will restrict to access the registration page if user is already logged in.

    if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'register' && is_user_logged_in() ) {
    	wp_safe_redirect( 'Your_Link_to_Redirect_Here' );
    }

    Copy and paste this code in your theme’s functions.php file. if you visit the Register form you will be redirected to a certain page.

    P.S: Kindly change the redirect link accordingly.

    Have a nice day

Viewing 1 replies (of 1 total)
  • The topic ‘Hide register page for logged users’ is closed to new replies.