Back to Blog

Change in Theme My Login Registration Message

Published on 16 May 2016

You may have installed this plugin to bring your login forms to the front-end and need to edit or customise the message displayed on the registration form.

“Registration confirmation will be e-mailed to you.”

 

I needed to change this for a clients project. To do this, I backtracked from the original code:

<p class="tml-registration-confirmation" id="reg_passmail<?php $template->the_instance(); ?>"><?php echo apply_filters( 'tml_register_passmail_template_message', __( 'Registration confirmation will be e-mailed to you.', 'theme-my-login' ) ); ?></p>

 

Here, we can see a filter being used in the output of the text, so we can hook into this filter and edit the output ourselves.

function tml_register_passmail_philowen($this) {
return 'You will be emailed confirmation of your registration with your temporary password.';
}
add_filter( 'tml_register_passmail_template_message', 'tml_register_passmail_philowen' );

 

Pop the above in your theme’s functions.php file or a separate plugin and edit the text in the return above to override the plugins own output.

Change in Theme My Login Registration Message | Phil Owen