Issue encountered while trying to keep website private

After reviewing a reset password link, I realised that two variables were being passed via $_GET: key and login. I’ve added the below code to the beginning of my redirect_user() function: if(isset($_GET[‘key’]) && isset($_GET[‘login’])) { return ; } It didn’t fix the issue and i was still being redirected to the login page whenever I … Read more

How to get php file based on URL in WordPress

WP determines template file by following Template Hierarchy. The process has quite a few steps between URL and resulting PHP file loaded, so generally one is not a reliable indication of the other. Outside of looking through likely template files (good enough in a simple theme) you can try dumping this with code in template_include … Read more