What PHP files load first? (Force Login)

Hello,

I'm trying to force login to visit my site with the following code:

<?php if (!is_user_logged_in()) { auth_redirect(); } ?>

This is straight out of WordPress codex so should be working however my home page continues to load without forcing the user to login.  I want to know where exactly I should be plugging this code into your theme as on the default it would work in the template file however your theme seems to override that somehow on the home page and allow access regardless.

Comments

Sign In or Register to comment.