Add error message on password protected pages
Here’s a combination of these two great answers (21697 & 71284) to similar questions. wpse241424_check_post_pass() runs early on the wp hook on single password protected pages. If an invalid password is entered, the INVALID_POST_PASS constant is set for use later in the form, and the password entry error cookie is removed to prevent the error … Read more