Check if user is logged in, inside php file in template directory
Since the file is in your theme directory, WordPress may not want the user to “directly” access it. Why not create a Page in wordpress, assign a Template Name to your PHP page and then assign that to the new page created in wordpress. For example, you would have a new page called “Members Only” … Read more