Advertisement
Guest User

BuddyPress - Show Group Member Bios on Group Directory

a guest
Jan 10th, 2013
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.76 KB | None | 0 0
  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='.bp_get_group_id().'&exclude_admins_mods=false' ) ) : ?>
  16.           <ul id="member-list" class="item-list">
  17.           <?php while ( bp_group_members() ) : bp_group_the_member(); ?>
  18.  
  19.             <li>
  20.               <!-- Example template tags you can use -->
  21.               <?php bp_group_member_avatar_thumb() ?>
  22.               <?php bp_group_member_link() ?>
  23.              
  24.               <div class="user_id">
  25.                 <?php $member_id = bp_group_member_id(); ?>
  26.               </div>
  27.              
  28.               <div class="user_bio">
  29.                 <?php $bio = xprofile_get_field_data( 'field=Biography', $member_id );
  30.                 echo $bio; ?>
  31.               </div>
  32.        
  33.             </li>
  34.           <?php endwhile; ?>
  35.           </ul>
  36.  
  37.         <?php else: ?>
  38.  
  39.           <div id="message" class="info">
  40.             <p>This group has no members.</p>
  41.           </div>
  42.  
  43.         <?php endif;?>
  44.             </div>
  45.  
  46.             <div class="action">
  47.  
  48.                 <?php do_action( 'bp_directory_groups_actions' ); ?>
  49.  
  50.                 <div class="meta">
  51.  
  52.                     <?php bp_group_type(); ?> / <?php bp_group_member_count(); ?>
  53.  
  54.                 </div>
  55.  
  56.             </div>
  57.  
  58.             <div class="clear"></div>
  59.         </li>
  60.  
  61.     <?php endwhile; ?>
  62.  
  63.     </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement