Redirecting Non-logged in Users
-
Hello ,
I need a system where all the non-logged in visitors to my site are redirected to a landing page.
CASE 1 : I have tried using this code below
if( !is_user_logged_in() ) { wp_redirect('http://facepassion.com/welcome') ; exit; }
It works but i don’t like the way it is preventing them from reading posts and pages.
Is there a way i can redirect them only to the landing page but not restricting them from reading pages and posts.
Anyone here to help ?
Thanks in Advance.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Redirecting Non-logged in Users’ is closed to new replies.