Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Getting a list of users activity count

got this thanks to Boones Gorges..

insert this in your bp-custom.php to get the total count of activity posts of a user:

function get_activity_count_by_user( $user_id ) {

$args = array(

‘per_page’ => 10000,

‘show_hidden’ => true,

‘user_id’ => $user_id

);

if ( bp_has_activities( $args ) ) {

global $activities_template;

$count = $activities_template->total_activity_count;

} else {

$count = 0;

}

return $count;

}

then use this template tag in your theme <?php echo get_activity_count_by_user( $user_id ) ?>

Skip to toolbar