Sort by xprofile field on Members page
-
Hi there,
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:
case ‘company’:
$sql[] = “ORDER BY pd.value ASC”;Thanks!
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.?
Thanks!
-Æ.
- The topic ‘Sort by xprofile field on Members page’ is closed to new replies.