Skip to:
Content
Pages
Categories
Search
Top
Bottom

Top-level Group Count


  • researchables
    Member

    @markcorgan

    How can I determine the number of top-level or site root groups, meaning the number of parent groups? I want to display the count of parent groups next to the group tree label on the group tree tab. I need something like

    `count(BP_Groups_Hierarchy::get_active()`

    but for all groups (except hidden), not just the active, newest, etc. Thanks.

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

  • researchables
    Member

    @markcorgan

    Anyone?


    researchables
    Member

    @markcorgan

    Found it:

    I called `get_total_subgroup_count` function in `bp_group_hierarchy_classes.php` passing the group id of 0, which returns the total count for the top-level parent groups.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Top-level Group Count’ is closed to new replies.
Skip to toolbar