Sort by xprofile field on Members page
I’ve created a custom profile field called “Company”, which I ultimately need the option to sort by alphabetically on the member list page. Ideally, this would be an option in the “Order by” dropdown on /members/.
Is there any way to do this without hacking bp-core-classes.php? I’ve thought about adding code around line 144 like so:
if ( ‘company’ == $type )
$sql = “AND pd.field_id = 2″;
and at line ~190:
$sql = “ORDER BY pd.value ASC”;
Note that I don’t want to search for it so much as sort by it; I’m basically using this page as a roster of organization members.
Would it make more sense to do companies as groups, then do some language file overrides renaming “Group” to “Company”, etc.?
- The topic ‘Sort by xprofile field on Members page’ is closed to new replies.