For most WordPress sites, the user’s display name is set to their chosen username. We created the Force First Last plugin to help site owners control the format of the default WordPress User’s display name. This guide demonstrates a few methods to change the display name using ffl_display_name_order filter in this plugin.

Banner graphic for Change Your WordPress User's Display Name to First and Last Name

About the Force First Last Plugin

The Force First and Last Name as Display Name WordPress plugin is a free plugin available on the WordPress.org repository. Once you install and active this plugin, users will not see the “Display Name” field on the Edit Profile screen. Instead of allowing users to set this field, the plugin will change the display name to their first and last name. If first and last name are not available, the user’s display_name will default back to their chosen username.

Note that the first and last name are not captured through a basic WordPress user registration or a free membership checkout with Paid Memberships Pro. If you want to add these fields to checkout, use the Add Name to Checkout Add On.

Banner graphic for the Force Display Name plugin

Recipe 1: Switch Display Name to “Last First”

This first recipe demonstrates how to change the display name order and show the user’s last name then their first name. Last name before first is common for legal names in many countries.


Recipe #2: Set Display Name as First Name Only

The second recipe will show all display names for all users as their First Name only. This creates a more personal experience for community sites, without sharing too much information.


Adding the Recipe to Your Website

You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method.

The plugin includes a “regenerate” tool that will update all users to the default format in the plugin, or a modified format if you put one of these recipes in place. Navigate to Settings > Force First Last to update all users.

Kim Coleman

Code Author: Kim

Kim is co-founder of Paid Memberships Pro. She has her hand in all aspects of the development, management, and marketing for the product and the team. She oversees frontend development for the core open source plugin and Add Ons.