This sounds dead bang simple, but I just can't figure it out.
I want the following functionality:
If user is not logged in and they try to access anywhere on the site (including the homepage) - send them to a specific page.
I tried, adding the following but received a "not redirecting properly" message:
if (!is_user_logged_in() ) {
wp_redirect ('/public' );
exit;
}
I guess if I can add a clause to the if statement saying and the page I am accessing is not the public page, but I'm not quite sure how to that properly.
Any plugins that I see out there redirect to the wordpress login screen.
Any help is greatly appreciated!
Thanks,
MG
bloginfo('wpurl').'/public';
home_url('/public')