SHOW:
|
|
- or go back to the newest paste.
| 1 | <ul id="groups-list" class="item-list" role="main"> | |
| 2 | ||
| 3 | <?php while ( bp_groups() ) : bp_the_group(); ?> | |
| 4 | ||
| 5 | <li> | |
| 6 | <div class="item-avatar"> | |
| 7 | <a href="<?php bp_group_permalink(); ?>"><?php bp_group_avatar( 'type=full&width=80&height=80' ); ?></a> | |
| 8 | </div> | |
| 9 | ||
| 10 | <div class="item"> | |
| 11 | <div class="item-title"><a href="<?php bp_group_permalink(); ?>"><?php bp_group_name(); ?></a></div> | |
| 12 | <div class="item-desc"><?php bp_group_description_excerpt(); ?></div> | |
| 13 | ||
| 14 | <?php do_action( 'bp_directory_groups_item' ); ?> | |
| 15 | - | <?php if ( bp_group_has_members( 'group_id=&exclude_admins_mods=false' ) ) : ?> |
| 15 | + | <?php |
| 16 | $this_id = bp_get_group_id(); | |
| 17 | $has_members_str = "group_id=" . $this_id . "&exclude_admins_mods=false"; | |
| 18 | ?> | |
| 19 | <?php if ( bp_group_has_members( $has_members_str ) ) : ?> | |
| 20 | <ul id="member-list" class="item-list"> | |
| 21 | <?php while ( bp_group_members() ) : bp_group_the_member(); ?> | |
| 22 | ||
| 23 | <li> | |
| 24 | <!-- Example template tags you can use --> | |
| 25 | <?php bp_group_member_avatar_thumb() ?> | |
| 26 | <?php bp_group_member_link() ?> | |
| 27 | <?php do_action( 'bp_directory_members_item' ); ?> | |
| 28 | ||
| 29 | <?php | |
| 30 | /*** | |
| 31 | * If you want to show specific profile fields here you can, | |
| 32 | * but it'll add an extra query for each member in the loop | |
| 33 | * (only one regardless of the number of fields you show): | |
| 34 | * | |
| 35 | * bp_member_profile_data( 'field=the field name' ); | |
| 36 | */ | |
| 37 | bp_member_profile_data( 'field=Biography' ); | |
| 38 | ?> | |
| 39 | </li> | |
| 40 | <?php endwhile; ?> | |
| 41 | </ul> | |
| 42 | ||
| 43 | <?php else: ?> | |
| 44 | ||
| 45 | <div id="message" class="info"> | |
| 46 | <p>This group has no members.</p> | |
| 47 | </div> | |
| 48 | ||
| 49 | <?php endif;?> | |
| 50 | </div> | |
| 51 | ||
| 52 | <div class="action"> | |
| 53 | ||
| 54 | <?php do_action( 'bp_directory_groups_actions' ); ?> | |
| 55 | ||
| 56 | <div class="meta"> | |
| 57 | ||
| 58 | <?php bp_group_type(); ?> / <?php bp_group_member_count(); ?> | |
| 59 | ||
| 60 | </div> | |
| 61 | ||
| 62 | </div> | |
| 63 | ||
| 64 | <div class="clear"></div> | |
| 65 | </li> | |
| 66 | ||
| 67 | <?php endwhile; ?> | |
| 68 | ||
| 69 | </ul> |