function mind_set_cookie_expire( $time ) { return 0; // return time() + 20; // return time() + 60 = 1 minute // return 0 to set the cookie to expire at the end of the session. } add_filter( 'post_password_expires', 'mind_set_cookie_expire' );