WordPress Admin

How To Redirect Logged Out Users To The WP Login Page

This code redirects anyone how isn’t a logged in user to the absolute URL in the code.

In this case, all logged out users will be redirected to the the login page however this URL can be changed to any URL.

This code can be used to make your site into a membership site and require logged out users to register before being able to view your sites content.

Leave a Reply

Your email address will not be published. Required fields are marked *