Skip to:
Content
Pages
Categories
Search
Top
Bottom

Group ID and Member ID outside of BuddyPress

  • @sirspacey

    Member

    I’m trying to grab the group ID and Member IDs on one of my wordpress pages using php (theming).

    `

    <?php if ( bp_get_group_status() == ('public')) {
    $team_id = $bp->group->id; ?>
    <option id="field_reg_groups_” name=”field_reg_groups[]” value=”” />:

    No teams are available at this time.

    `

    The line that is giving me problems is: $team_id = $bp->group->id;

    How can I get the group ID? I tried bp_group_id(), and while that would print the value, it wouldn’t allow me to capture the value in a variable.

    Once I have the group ID, how do I get the member ids? Thanks

Viewing 1 replies (of 1 total)
  • @sirspacey

    Member

    This worked. The proper syntax for group id: $team_id = bp_get_group_id();

Viewing 1 replies (of 1 total)
  • The topic ‘Group ID and Member ID outside of BuddyPress’ is closed to new replies.
Skip to toolbar