How to show groups user is an admin of?
-
I have written some code to show within a profile tab I created to display a users groups, but I would also create another section showing groups the user created/ is an admin of. Does anyone know of the code I require to make this work? Here is what I have so far.
// Show profile groups $args = array( 'max' => 3, 'user_id' => $displayeduser, ); if ( bp_has_groups( $args ) ) { ?><div class="profile-stream-block"> <div class="profile-stream-title"> <h3><i class="fa fa-users"></i> Groups</h3> </div> <div class="profile-stream-content"> <ul id="groups-list" class="item-list" role="main"><?php while ( bp_groups() ) : bp_the_group();?> <li <?php bp_group_class(); ?>> <div class="item-avatar"> <a href="<?php bp_group_permalink(); ?>"><?php bp_group_avatar( 'type=full&width=70&height=70' ); ?></a> </div> <div class="item"> <div class="item-title"><a href="<?php bp_group_permalink(); ?>"><?php bp_group_name(); ?></a></div> <div class="item-meta"><div class="mobile"><?php bp_group_type(); ?></div><span class="activity"><?php printf( __( 'active %s', 'boss' ), bp_get_group_last_active() ); ?></span></div> <div class="item-desc"><?php bp_group_description_excerpt(); ?></div> </div> </li> <?php endwhile;?> </ul> </div> </div> <?php }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.