Friendlier Messages on the Registration Screens
Explains what happens next above the WordPress registration form and replaces the terse "Registration complete" notice with clearer instructions about the confirmation email.
Opens WPIDE on
Code
$wpide_register_intro = 'Create your free account. We will email you a link to set your password, so use an address you can access right now.';
$wpide_register_done = 'Almost there! Check your inbox for an email with a link to set your password. It can take a few minutes; look in your spam folder too.';
add_filter( 'login_message', function ( $message ) use ( $wpide_register_intro ) {
$action = isset( $_REQUEST['action'] ) ? sanitize_key( $_REQUEST['action'] ) : '';
return 'register' === $action ? '<p class="message register">' . esc_html( $wpide_register_intro ) . '</p>' : $message;
} );
add_filter( 'wp_login_errors', function ( $errors ) use ( $wpide_register_done ) {
if ( $errors instanceof WP_Error && isset( $_GET['checkemail'] ) && 'registered' === $_GET['checkemail'] && $errors->get_error_code() ) {
$errors->remove( 'registered' );
$errors->add( 'registered', esc_html( $wpide_register_done ), 'message' );
}
return $errors;
} );
Notes
Edit both texts at the top; they appear on wp-login.php?action=register and right after registering.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.