I was able to make a query that gives me the total number of all the members of a group. I should be able to make a for() for each of the group_id of all the groups but I’m not sure how to create a widget for that.
any idea or help?
SELECT SUM(us.meta_value) AS meta_value_total FROM 'wp_bp_groups_members' AS ww
INNER JOIN wp_usermeta us
ON ww.user_id = us.user_id
WHERE ww.group_id = 1 AND us.meta_key ="mycred_default"
Plugin Author
myCred
(@designbymerovingi)
There is a free add-on available on the myCRED website that allows you to setup group leaderboards in BuddyPress
thanks for answering, but what i’m trying to do is get the total of all the members of the group and show it on a group leaderboard to see what group has the most points.
-
This reply was modified 9 years, 6 months ago by
mnicdpc.
@mnicdpc
Did you get it working? Could you post the code here?