4

I am using theme my login plugin and want to replace message when people registered and it's redirect back to login page with displaying message at the top of the form.

Message: Your registration was successful but you must now confirm your email address before you can log in. Please check your email and click on the link provided.

I want to replace this message.

5

The below should work as is (with your strings for the new message and the theme's text domain), when inserted in your theme's functions.php:

function wpse71032_change_tml_registration_message( $translated_text, $text, $domain ) {
    if( $domain === 'theme-my-login' &&
        $text === 'Your registration was successful but you must now confirm your email address before you can log in. Please check your email and click on the link provided.'
    ) {
        /* in the below, change the first argument to the message you want
           and the second argument to your theme's textdomain */
        $translated_text = __( '%Registration Message%', 'theme_text_domain' );
    }
    return $translated_text;
}
add_filter( 'gettext', 'wpse71032_change_tml_registration_message', 20, 3 );

See the article on the gettext filter in the Filter Reference.

  • It is not changing the message. here what I have replaced if I am wrong somewhere $translated_text = __( 'Check your email Inbox or Junk/Spam folder for verification link', 'marinebox' ); //marinebox is my theme name – pixelngrain Oct 31 '12 at 12:13
  • That was my mistake.. it's working now. Thanks a lot! – pixelngrain Oct 31 '12 at 12:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.