Thank you for reaching out to us. Do you have the following feature Logout Member on Browser Close enabled? The following documentation can help you further.
https://simple-membership-plugin.com/automatically-logout-members-browser-closure-force-member-logout/
Do you have a cache plugin running in your site?
Kind regards.
Thanks for the quick reply, really appreciate it.
No, I have not that option checked, and there is no cache plugin on the site, yet – could it be a problem if I had?
No, I have not that option checked, and there is no cache plugin on the site, yet – could it be a problem if I had?
No, it does not cause any issues. Could you maybe provide more information. I am just trying to workout exactly what is it that you are trying to achieve.
Kind regards.
Okay, I’ll try.
- When I log in with your plugin, this CSS-class is added to the body of any restricted page: “logged-in”.
- I use this class with some custom CSS to hide the sidebar/footer, on restricted pages when a visitor is NOT logged in.
- Sometimes, when I’ve been logged in for an extended timeframe (a day or two), and the browser and/or (?) plugin has kept me logged in, I visit a restricted page, I can tell that I am still logged in (se screengrab above), but the CSS-class has disappeared from the body.
Only solution as of now, is to log out, and then back in again. Then the CSS-class is in place, as it should be.
So what’s happening here? Is it a conflict of how the browser visavi the plugin keeps a user logged in?
I use this class with some custom CSS to hide the sidebar/footer, on restricted pages when a visitor is NOT logged in.
What is the custom CSS that you are adding? Does your server run any caching system?
Kind regards.
On restricted pages the sidebar is still visible, so I hide that. And since I couldn’t solve the issues with my footer, I also hide this.
And no, there is no caching going on on the server.
You have not shared your custom CSS code?
Regards.
body:not(.logged-in).page-template-template-section-nav #grve-sidebar,
body:not(.logged-in).page-template-template-section-nav #grve-footer {
display: none;
}
Thank you for sharing your custom css code. Looking at the custom css code, it really has nothing to do with our plugin. So, your issue is unique to your set up. Have you tried different browsers? Does your browser have any addon or extension that might cause this type of interference? In most case scenarios, no one leaves their login active overnight. The majority of users login and then logout. If this worries you a lot, you can always display a custom message to all users when they log in reminding them to make sure they log out when they finish their session.
Does the above help you in any way?
Kind regards.
-
This reply was modified 1 year, 3 months ago by
mbrsolution.
Ah, so the “logged-in”-part of the css, is not generated by your plugin, but is a WP standard class for a password protected page?
Please have a look at some of our custom CSS code we have available for our plugin.
https://simple-membership-plugin.com/miscellaneous-css-tweaks-simple-membership-plugin/
Let me know if this helps you in any way.
Kind regards.
Thanks, but no – this doesn’t affect my problem or needs. I was just wondering if the css class .logged-in that is added to the body for password restricted pages after I log in, was generated by your plugin or wp core.
I was just wondering if the css class .logged-in that is added to the body for password restricted pages after I log in, was generated by your plugin or wp core.
Unfortunately no. Our plugin does not use the following class “.logged-in”.
Kind regards.