Guest User

buddypress group id

a guest
Sep 1st, 2011
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.67 KB | None | 0 0
  1. <select id="team_id" name="team_id">
  2.         <?php $i = 0; ?>
  3.         <?php if ( bp_has_groups('type=alphabetical') ) : while ( bp_groups() ) : bp_the_group(); ?>
  4.             <?php if ( bp_get_group_status() == ('public')) {
  5.                 $team_id = $bp->group->id; ?>                              
  6.                 <option id="field_reg_groups_<?php echo $i; ?>" name="field_reg_groups[]" value="<?php $team_id; ?>" <?php if ($team_id == $team_id_check) {echo ' selected="selected"';} ?> /><?php echo $team_id; ?>:<?php bp_group_name(); ?></option>                          
  7.             <?php } ?>
  8.         <?php $i++; ?>
  9.         <?php endwhile; /* endif; */ ?>
  10.         <?php else: ?>
  11.         <p class="reg_groups_none">No teams are available at this time.</p>
  12.         <?php endif; ?>
  13. </select>
Advertisement
Add Comment
Please, Sign In to add comment