Force the user field
display_name to be set as the user’s first and last name.
This plugin hides the “Display Name” field on the Edit Profile screen for all users. Instead of allowing users to set this field, the plugin will always set the User field
display_name to their first and last name. If these field are empty,
display_name will be set to their username.
Display names are set when the user registers as well as when a user’s profile is updated via the WordPress admin.
The plugin includes a batch process to update the display name for existing users. Navigate to Settings > Force First Last in the WordPress admin to run the update.
Paid Memberships Pro Compatibility
This plugin is now compatible with Paid Memberships Pro. The “Display Name” field is hidden from the frontend Member Profile Edit page. Display Name is automatically set when this form is saved. Display Name will also be updated at membership checkout if you are capturing the member’s first and last name via custom user fields or when using the Add Name to Checkout Add On.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- Visit Settings > Force First Last to run an initial update for all of your users.
Modify Display Name Format
The plugin supports one filter to modify how the
display_name is set. You can use this filter to set the user’s name to just their “First Name” or to reverse the display name as “Last Name First Name”.
Once that’s code is in place, whether through a custom plugin or the Code Snippets plugin, you can run the script to retroactively update all users from the Force First Last admin settings page under “General”.