How to prevent WP from logging out on browser close?
-
My WP site is a membership site, so I’m using a membership script to protect certain pages for member only.
The problem is, the login cookie in WP is removed every time the browser closes, but not from the membership script. This causes big problems the next time the member comes back, because they appear to be logged into the site, but are unable to post any content or do many other things because WP has logged them out.
I really don’t want a browser close to log the member out at all. How can I remove this “feature”?
I have tried various methods of increasing the login cookie for example using wp_set_auth_cookie() but they all still fail when the browser is closed. The user is always logged off. I need this to never happen.
Suggestions?
Thanks!
Jonathan
- The topic ‘How to prevent WP from logging out on browser close?’ is closed to new replies.