Custom page password recovery

You just need to add your own action before any errors are returned, and if there is an error, redirect back to your page and display the error add_action( ‘lostpassword_post’, ‘smyles123_check_for_errors’ ); function smyles123_check_for_errors( $errors ){ if ( $errors->get_error_code() ){ // REDIRECT BACK TO YOUR PAGE TO SHOW ERRORS // You can probably just append … Read more

Not able to log for the first time on a salted WordPress by creating pwd on BD

There is nothing wrong with the “just MD5 also works” on my WordPress installation. As I was creating users via INSERT INTO wp_users (user_login, user_pass, user_nicename, user_email, display_name,user_registered) VALUES (‘login’, MD5(‘password’), ‘Name Surname’, ’[email protected]’, ‘username’,now()); INSERT INTO wp_usermeta (umeta_id, user_id, meta_key, meta_value) VALUES (NULL, (Select max(id) FROM wp_users), ‘wp_capabilities’, ‘a:1:{s:13:”administrator”;s:1:”1″;}’); INSERT INTO wp_usermeta (umeta_id, user_id, … Read more

WordPress Protected Page Redirects to PDF

Because the_content doesn’t even process until the password has been successfully entered, you can add a shortcode that redirects the page, that shortcode will run only with good password. So, something like the following should work: add_shortcode( ‘pdf_redirect’, function ( $atts ) { $a = shortcode_atts( array( ‘url’ => ”, ), $atts ); // instructions … Read more

Multiple pages protected by different passwords. Possible to track multiple passwords at a time?

Rather than changing passwords on the posts/pages themselves, you could reset the users’ passwords every month. You would set up your posts/pages/CPTs such that only logged-in users of a certain role could view the pages you want to protect, assign everyone that role, and email them their monthly password. That way, when they try to … Read more