Groups Orderby field in groupmeta
-
Hi there,
I want to order my groups on a field that is located in the bp_groups_groupmeta table. I thought I can achieve this with the meta_query but I can’t find any good examples. Does someone got experience with this kind of sorting?
Currently I have this:
bp_has_groups( [ 'page' => 1, 'per_page' => $max_results, 'type' => '', 'order' => '', 'group_type__not_in' => 'event', 'orderby' => 'FIELD(id, ' . implode(',', $nearby_groups_ids) . ')', 'include' => implode(',', $nearby_groups_ids), ] )
And I want to order on this field (meta_key): group_event_setting_datetime
Thanks!
Kind Regards,
Jarah
- You must be logged in to reply to this topic.