Skip to:
Content
Pages
Categories
Search
Top
Bottom

Member Alphabetical Sort


  • Engine44
    Participant

    @engine44

    I have the latest versions of WP, BP and bbP.

    There is a sort option on the BP members page that allows you to sort users alphabetically. It appears that it is sorting on people’s first names which is not helpful. Can I get it to sort on last names? Thanks.

Viewing 1 replies (of 1 total)

  • Henry Wright
    Moderator

    @henrywright

    The default sort order is ‘active’ members first. To easily change that, you can make use of bp_after_has_members_parse_args. For example, try adding this to your theme’s functions.php file:

    function my_custom_member_list_sort( $ret ) {
        $ret['type'] = 'alphabetical';
        return $ret;
    }
    add_filter( 'bp_after_has_members_parse_args', 'my_custom_member_list_sort' );
    

    Note, this will sort all member lists you have anywhere on your site, not just the one at example.com/members.

Viewing 1 replies (of 1 total)
  • The topic ‘Member Alphabetical Sort’ is closed to new replies.
Skip to toolbar