Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Sorting member directory by display name not username

@terraling

Participant

Thanks @godavid33.

I’d like to fix this without having to resort to a custom sql query.

BuddyPress is designed to do this (sort alphabetically by display name rather than username) correctly.

In the relevant code, it checks to see if WordPress-BuddyPress profile syncing is enabled. If it is, it runs the query against the wp_users table rather than the wp_bp_xprofile_data table, because “the table is smaller and better indexed”. If syncing is disabled then it runs the query against the xprofile display_name field instead.

I have fixed the problem by turning off syncing so that it uses the xprofile display name, so my question is, what does profile syncing do exactly and when/how does it do it?

I presume it overwrites nicename in wp_users with the display_name from xprofile (anything else?), but in my case it is not doing so, it appears broken.

If I could identify the when/how then I’d be able to see if it is something I’ve broken or omitted in, for example, my custom registration page.

Skip to toolbar