Using WordPress login authentication in external PHP file
I am having issues using WordPress authentication in an external PHP file to validate that the user is in fact an admin rather than someone who isn’t meant to have access.
For some reason I can’t even get a basic “is_user_logged_in” check to return any value at all.
This is the code I using:
if ( is_user_logged_in() )
This is always displaying “test2” and if I echo “is_user_logged_in” it will return nothing at all, not even NULL.
- The topic ‘Using WordPress login authentication in external PHP file’ is closed to new replies.