Only Allow Front End Access

You want users to Sign Up before they can see any page on your website?

If that’s what you need then I think this is something I can do using jQuery.

Try adding this code to your footer.php in the very end before the tags.

<script>
jQuery(document).ready(function($){
if (!$("body").hasClass("logged-in")) {
window.location.replace("/register");
}
});
</script>

Now, what this code does?
Basically every page in WordPress gets the class “logged-in” in the body tag when the user is logged in. So we check if the user is logged in and if they’re not then simply redirect them to the register page.

Still need help? Contact me.