Our PMPro Member Directory and Profiles Add On allow you to add a public or members-only directory to your membership site.

This directory has a default sort order of First Name followed by the Last Name of the member. This recipe will override the default sort order to display the member’s Last Name followed by their First Name.

Banner Image for Customizing the Default Member Directory Sort Order

About the Code Recipe

Some Associations, Organizations, and clubs prefer to filter and search through their members by means of their last name as opposed to their first name. While our PMPro Membership Directory and Profile Pages Add On allows you to search for any term of your choice, by default, the member’s first name will be displayed initially, followed by their last name. For ease of use, this code recipe was developed to allow you to display your member’s Last Name initially, and then their Last Name.

The Code Recipe

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.

Free Course: Membership Site Development—The Basics

Develop a deeper understanding of membership site development in this beginner-level course. Learn how to make your site work better, save yourself time and money, and improve your site's performance.

Featured Image for Membership Site Development Course: The Basics
Was this article helpful?