Won’t support hyperlinks in text replacement

[ad_1]

Hi @shayatik

I hope you are doing well today.

The Text Replacement module does not allow adding custom hyperlinks. Only the Login Screen is able to change error messages, but at the moment it does not support those messages:

Error: This email address is already registered. Log in with this address or choose another one.
Error: This username is already registered. Please choose another one.

I pinged our Branda Team can we consider this as an improvement. I have also pinged our SLS Team to check if they can provide some snippets in that matter. We will post an update here as soon as more information is available.

Kind Regards,
Kris

Thanks. For now I’ve solved it with the following snippet:

function custom_registration_error_message($translated_text, $text, $domain) {

    if ($text == ‘This email is already registered. Please choose another one.’) {

        $translated_text = ‘This email is already registered. <strong><a style=”text-decoration: underline” href=”https://domain.com/login/”>Please login here</a></strong>’;

    }

    return $translated_text;

}

add_filter(‘gettext’, ‘custom_registration_error_message’, 20, 3);

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer