• I am experience an issue with user logged in not being recognised. I tried using maintenance mode plugin but this kept redirecting users even if they were logged in.

    I then tried using the following to manually redirect users who are not logged in’. I put this as the first thing in the header.php file:

    if ( ! current_user_can( 'manage_options' ) ) {
     	wp_redirect('https://www.mydomain.com.au/index.html');
     }

    However, like the Maintenance Mode plugin it doesn’t seem to be recognising if a user is logged in or not. I also tried using other options like if is_user_logged_in() but this also didnt recognise the user as being logged in.

    This is a new site on GoDaddy hosting. Everything I am using works on other sites with different hosts.

    Any suggestions?

  • The topic ‘User logged in not being recognised’ is closed to new replies.