How to Set Password Cookie in WordPress Posts - PPWP Pro

PHOTO EMBED

Mon Apr 24 2023 05:43:06 GMT+0000 (Coordinated Universal Time)

Saved by @Roelinde #password #cookie

function mind_set_cookie_expire( $time ) {

return time() + 86400;  // 1 day

}

add_filter( 'post_password_expires', 'mind_set_cookie_expire' );
content_copyCOPY

https://passwordprotectwp.com/wordpress-password-protected-page-cookie/