excluding reg page (is_user_logged_in) (2 posts)

  1. bryanjlaz
    Posted 2 years ago #

    I am fairly new to PHP and I am trying to block the site access, redirecting all users/non-users to the wp-login.php page.. THEN on the login page, the non-registered users can still access the registration page.
    I have inserted this code into the theme header and it works great,

    <?php if(!is_user_logged_in()){header("Location: http://WP/wp-login.php");} ?>

    except there is no access to the reg. page, of course.
    What can I add to this code to exclude the registration page, so when the link is clicked, it will at least be viewable and work?


    Thank you for your help..

  2. bryanjlaz
    Posted 2 years ago #

    Correct.. The code I inserted is...

    header("Location: http://worldwidelogisticsltd.com/intranet/wp-login.php");} ?>


Topic Closed

This topic has been closed to new replies.

About this Topic