I am creating a website using WordPress. I am new to it. I have a separate homepage for logged out users and logged in users. Page for logged out users tells them to sign up or log in. And homepage for logged in users show them there profile. So the index.php is the homepage for logged out users. And i have created a different page freevideofy.com/home for logged in homepage.
I use plugin - login redirect to redirect them to freevideofy.com/home when they login in or sign up. And i use plugin - logout redirect to redirect them to freevideofy.com when they logout. But the problem is, if a logged in user closes my website, and again opens it by url - freevideofy.com then they are not automatically redirected to freevideofy.com/home.
So I want if logged in user opens the url - freevideofy.com, then he should be redirected to freevideofy.com/home. I think this function can be used - is_user_logged_in