Re: Order/sort activity by “most favorites”
@r-a-y thanks for your reply! I don’t know a lot of php so please bear with me. This is what I did, based on what you suggested:
`
get_results(“SELECT activity_id FROM $wpdb->wp_bp_activity_meta WHERE meta_value = ‘favorite_count’ ORDER BY meta_value”);
foreach ($favorite_id as $favorite_id) {
echo $favorite_id->activity_id;
}
?>
` etc..
Nothing gets echoed in the foreach loop, but $favorite_id echoed on its own returns “array”. I’m sure I’m doing something wrong as what gets outputted in the browser is “Sorry, there was no activity found. Please try a different filter.” even though there are 4 activity items favorited by two different test users. 
What am I doing wrong? Many thanks for any help!!