Password reset message – change the network_home_url( ‘/’ )

Let’s check the Codex and follow the links to the source: 3029 function network_home_url( $path=””, $scheme = null ) { 3030 if ( ! is_multisite() ) 3031 return home_url($path, $scheme); 3032 3033 $current_site = get_current_site(); 3034 $orig_scheme = $scheme; 3035 3036 if ( ! in_array( $scheme, array( ‘http’, ‘https’, ‘relative’ ) ) ) 3037 $scheme … Read more

WordPress protected Pages

The protected post system uses POST so by default, no you can’t. However, here is a bare-bone mechanism that will let you do this. function bypass_protected_post() { if (is_single()) { global $post,$_GET; if (isset($post->post_password)) { $bypasskey = get_post_meta($post->ID, ‘bypasskey’, true); if (isset($_GET[‘bypasskey’]) && $_GET[‘bypasskey’] == $bypasskey) { $post->post_password = null; } } } } add_action(‘wp_head’,’bypass_protected_post’); … Read more

Forgot password not working

Probably you dont have any mail server installed/enabled (like sendmail/qmail/postfix) in your local machine. You can still reset your admin password from database. The table “wp_users” stores the password in the “user_pass” field You can just replace the value with a md5 hash value of your desired password for the admin user. Note: This is … Read more

User defined password at registration – registration email sends auto generated pass

Welcome to WPSE. You can use wp_insert_user, you don’t need to hook onto anything. Assuming here they fill out a form with a name, username, email and password field, and you capture it however you want. $name_array = explode(‘ ‘,$_POST[‘name’]); $user = array( ‘user_login’ => $_POST[‘username’], ‘user_pass’ => $_POST[‘password’], ‘user_email’ => $_POST[’email’], ‘first_name’ => $name_array[0], … Read more

Change Password notification text on mail

If I understand you correctly, then you only want to change the text of the mail. This you can do via the filter hook password_change_email. No need to redeclare the function, which you actually can’t do. Below you find an example on how to use the password_change_email filter to change your message text. add_filter( ‘password_change_email’, … Read more

How to automatically apply a password to all posts within a custom post type

If you want to make all the posts for a post type password protected with the same password then you can do run an update query like below to make this happen. Use the following code in the active theme’s functions.php file. global $wpdb; $wpdb->update( $wpdb->prefix . ‘posts’, array( ‘post_password’ => ‘wpse’ ), // Replace … Read more