Skip Navigation

[Resolved] Customizing login / password reset form fields labels

This support ticket is created 5 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 5 years, 10 months ago.

Assisted by: Nigel.

Author
Posts
#1184576

It's probably something simple, but I'd need your help anyway on where I can adjust login / resetting password forms labels? (e.g. I want to change "Username or Email" label)

#1185017

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Piotr

As the Toolset custom login forms are built on standard WordPress login forms you can use the login_form_defaults filter to modify the labels, as shown in this code sample (where I add custom labels so that they are suitable for translation):

function tssupp_custom_label( $args ){

  $args['label_username'] = __( 'Custom username label', 'tssupp' );
  $args['label_password'] = __( 'Custom password label', 'tssupp' );
  $args['label_remember'] = __( 'Custom remember label', 'tssupp' );
  $args['label_log_in'] = __( 'Custom log_in label', 'tssupp' );

  return $args;
}
add_filter( 'login_form_defaults', 'tssupp_custom_label' );

See https://developer.wordpress.org/reference/hooks/login_form_defaults/