is_user_logged_in() – strange results
-
I’m working on a site whereby logged in subscribers can view certain content, using the is_user_logged_in() function.
The homepage for instance shows different content when a user is logged in.
Once logged in, the user will see the same ‘logged out’ version of the homepage, until they navigate to a page that is only available to logged in users.
1. User logs in -> visits homepage, sees non-logged in version of homepage
2. User visits a users-only page (a page not accessible to non-users at all)
3. User then goes back to homepage, sees logged-in (correct) version of the homepageIt’s as if the user needs to visit the users-only page in order for is_user_logged_in to be triggered across the rest of the site.
This happens whether ‘Cache Logged-in Users’ option is switched on or off.
I couldn’t find the same topic covered anywhere else on here so far – any help appreciated!
- The topic ‘is_user_logged_in() – strange results’ is closed to new replies.