• Resolved adamhatch

    (@adamhatch)


    Hello, Thanks for the addon.

    I’m trying to create a directory with a custom order. I’d like to add some logic to decided what order the profiles should be ordered in based on the user’s search. For example, if a user says their need for finance advice is 5/5 (where 5 means very important) and law advice is 3/5, I’d like to show them a list of users that have good finance skills (4-5 out of 5) and decent or very good law skills (2-5 out of 5) rather than just listing them in ascending/ descending order based on finance/law.

    I can probably figure out the logic myself, but I don’t know what hooks to use or how about getting the search results reordering them and then returning them. Any help would be much appreciated.

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author Andrea Tarantini

    (@dontdream)

    Hello Adam,

    BP Profile Search only does the members search, while the sorting and display are done by BuddyPress.

    To alter the order of results you can use the BuddyPress hook bp_has_members (file buddypress\bp-members\bp-members-template.php) and alter the order of the elements of the array $members_template->members.

Viewing 1 replies (of 1 total)

The topic ‘Custom Directory Order’ is closed to new replies.