How to determine from a different folder (outside wordpress) if a visitor is logged into Wordpress
The WordPress area of my site (which has registration) is in for example mydomain.com/members/
I would like to know from a PHP routine in my public_html
root mydomain.com/offers.php
if they are logged into the WordPress area mydomain.com/members
I have tried various things to try and get this to work without success. get_current_user_id()
always returns 0
or is_user_logged_in()
returns false
.
If it helps to give me the correct solution, my WordPress uses the theme MH-Magazine, and uses the plugins Paid Memberships Pro and Theme My Login.
Topic outside-wordpress php Wordpress
Category Web