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.
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
what you ask for requires files customization what in reference to Item Support Policy is not allowed. So if you want to modify files and don't know how, you should contact with your web developer.
P.S. This code probably need to be pasted into index.php code but for more details you should contact with your developer who is responsible for modifications on your site.
Thanks!
Well thank you