How to configure WordPress Auth Cookie Expiration .Meaning how to automatically logged out user after particular time of logged in.
WordPress provide auth_cookie_expiration filter for setting logged in expiration time .
For setting logged out time please add this code to functions.php of theme.
/* Login for only 1 hour */ add_filter( 'auth_cookie_expiration', 'keep_me_logged_in_for_1_hour',9999,1 ); function keep_me_logged_in_for_1_hour( $expirein ) { return 60*60; }
Post Views: 10