I want to extend the login session with cookie expiration time

  • Spammers will be banned immediately without warning. Read our Signup Policies here.
  • 🎉 We've Hit 1 MILLION VIEWS in April 2025! 🚀

    We're proud to announce that blackhatforums.net has officially crossed 1,000,000 page views in a single month — April 2025! 🤯

    This milestone is a direct result of your hustle, strategies, and contributions. Whether you're dominating SEO, pushing traffic, or just absorbing knowledge — this is your win. 💪

    👉 Read the Celebration Thread Here

    — The blackhatforums.net Team

cedrick

Newbie
Messages
2
Likes
0
Points
1
Hello,

Is it possible to change the expiration time of the logged in cookie? Right now I have to login again from time to time. But I want to extend this time to be much longer, maybe infinite.

The thing is I have created pages on the frontend that requires you to be logged in, and I don't want the user to have to login again.

Is it possible to set the login expiration for frontend to never expire? Or maybe both?

thanks
 
Wordpress have a filter provided to set the cookie expiration.
Code:
https://developer.wordpress.org/reference/hooks/auth_cookie_expiration/

Hope this help :)
 

Members online

No members online now.