Title: Display group document count in groups loop?
Last modified: August 22, 2016

---

# Display group document count in groups loop?

 *  Resolved [hiStrat76](https://wordpress.org/support/users/histrat76/)
 * (@histrat76)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/display-group-document-count-in-groups-loop/)
 * Hi,
 * Is there a way to echo the group document count on the groups directory? I’ve
   been playing around with this:
    <?php echo “<p> Number of documents: ” . BP_Group_Documents::
   get_total($bp->groups->current_group->id) . “</p>”; ?>
 * But the number always shows as 0 even when a group does have a number of documents
   uploaded.
 * Thanks,
    Anne
 * [https://wordpress.org/plugins/bp-group-documents/](https://wordpress.org/plugins/bp-group-documents/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [hiStrat76](https://wordpress.org/support/users/histrat76/)
 * (@histrat76)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/display-group-document-count-in-groups-loop/#post-5636600)
 * Anybody have insight on how to do this? I’m still trying. Do i need to load something
   previous on the groups loop to make the number appear correctly per group?
 * Thanks,
    Anne
 *  Plugin Author [lenasterg](https://wordpress.org/support/users/lenasterg/)
 * (@lenasterg)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/display-group-document-count-in-groups-loop/#post-5636604)
 * [@histrat76](https://wordpress.org/support/users/histrat76/).
    If you are in 
   the groups loop you can use the following code `<?php echo "<p> Number of documents:".
   BP_Group_Documents::get_total( bp_get_group_id() ) . "</p>"; ?>`
 *  Thread Starter [hiStrat76](https://wordpress.org/support/users/histrat76/)
 * (@histrat76)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/display-group-document-count-in-groups-loop/#post-5636605)
 * Works perfectly, thank you!
 * Anne

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Display group document count in groups loop?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bp-group-documents.svg)
 * [BP Group Documents](https://wordpress.org/plugins/bp-group-documents/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bp-group-documents/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bp-group-documents/)
 * [Active Topics](https://wordpress.org/support/plugin/bp-group-documents/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bp-group-documents/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bp-group-documents/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [hiStrat76](https://wordpress.org/support/users/histrat76/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/display-group-document-count-in-groups-loop/#post-5636605)
 * Status: resolved