Redirect to login page
If I understood correctly, you need to check if the user is logged in, if not, redirect it to login page. If the user logs in succesfully, he should be redirected to the page he was trying to see. You can do this by using the redirect argument of wp_login_url(). This code should work (not … Read more