Styling my own password protected page, how to deal with wrong password?

This worked for me adding this code in functions.php: add_filter( ‘the_password_form’, ‘wpse_71284_custom_post_password_msg’ ); /** Add a message to the password form. @wp-hook the_password_form @param string $form @return string */ function wpse_71284_custom_post_password_msg( $form ) { // No cookie, the user has not sent anything until now. if ( ! isset ( $COOKIE[ ‘wp-postpass‘ . COOKIEHASH ] … Read more

Password protect pages – allow more than one password

In your functions.php you could create a shortcode that shows the link only if a valid password was supplied. This would look like the following code (untested): function protected_download_handler( $atts ){ if (in_array(@$_REQUEST[‘password’], array(‘password1’, ‘password2’, ‘password3’)) { $return = ‘<a href=”https://wordpress.stackexchange.com/questions/191035/link/to/download/”>Download</a>’; } else { $return = ‘<form action=”” method=”post”> <input type=”text” name=”password”> <input type=”submit”> </form>’; … Read more

Custom Front End Registration – How Does the Key work in the Password Set Request?

Because I couldn’t find an answer on this, I handled it myself by setting my own cookie in the function and checking that. Here is the revised function: function custom_login_init () { $action = isset($_REQUEST[‘action’]) ? $_REQUEST[‘action’] : ‘login’; if ( isset( $_POST[‘wp-submit’] ) ) { $action = ‘post-data’; } else if ( isset( $_GET[‘reauth’] … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)