• Hi all,

    I don′t want people to register at my site, so I unchecked the option “Anyone can register” in the WordPress settings. However, I want to change the text people now see when they click on “Register New Account”. Right now, the text is “Create an Account
    User registration is currently not allowed.” How can I change this text?

    Best,
    Richard

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Richard,

    Try using wp_login_errors filter.

    Something like this should work:

    add_filter( 'wp_login_errors', 'override_registration_disabled_message', 10, 2 );
    function override_registration_disabled_message( $errors, $redirect_to )
    {
    	if( isset( $errors->errors['registerdisabled'] ) )
    	{
    		foreach( $errors->errors['registerdisabled'] as $index => $msg )
    		{
    			$errors->errors['registerdisabled'][$index] = __( 'Your custom message' );
    		}
    	}
    	return $errors;
    }

    Regards,
    Konstantinos

    Thread Starter richardvvv

    (@richardvvv)

    Hi Konstantinos,

    I′ve tried adding this to my functions.php file, but it doesn′t work.

    Thanks,
    Richard

    You could try to uninstall a plugin and install it again to clear all information. Then you can add your own text.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change text of user registration page’ is closed to new replies.