Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do I find the Group_ID ?


  • mstublefield
    Member

    @mstublefield

    I’m trying to integrate BuddyPress into a new site I’m building for our Computer Services Help Desk, and one of the things we’d like is a page that displays staff member’s names, profile pictures, and biographies. After messing with a few other options, I thought to use BP and add all the staff into a group, then call that group on a page to display everyone in it.

    The bp_group_has_members function should do this, I think, but it require a group_id, and I can’t find any documentation on how to find out the group_id. Everything through BuddyPress is page slugs, and disabling permalinks breaks everything.

    Can anyone tell me how to find a group’s group_id? Thanks.

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

  • ella_j_designs
    Member

    @ella_j_designs

    I need the same information…

    Anyone?


    danbpfr
    Participant

    @chouf1

    search your database for wp_bp_groups: the info is there, for sure !


    r-a-y
    Keymaster

    @r-a-y

    Try:

    bp_get_group_id();


    Brajesh Singh
    Participant

    @sbrajesh

    The

    bp_get_group_id() will only work if you are on group page.

    In case you are not on group page and want to know the group id, there is a way to find that, but you will have to know the group slug(check the url of group for slug)

    $group_id=BP_Groups_Group::get_id_from_slug($slug);

    where $slug is the group slug.


    r-a-y
    Keymaster

    @r-a-y

    You’re right, Brajesh.

    Forgot about that function!


    ella_j_designs
    Member

    @ella_j_designs

    Thank you. And what exactly do I do with that bit of code?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How do I find the Group_ID ?’ is closed to new replies.
Skip to toolbar