Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Show the Total posts count and forums count for Each User

@vignesh-m

Participant

i found and solve the issue on my ownway.. This is the code for display posts count for individual users(members).. Hope it works….

<?php
$user_id = bp_get_member_user_id();
$query = new WP_Query( ‘author=’ . $user_id );

if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();
//display title
/*the_title();*/
//display content
/*the_title();*/

}
}
echo ‘Number of posts published by user: ‘ . count_user_posts($user_id);
//reset for next member
wp_reset_postdata();
?>

Skip to toolbar