Advertisement
Guest User

Modified Groups Listing

a guest
Oct 4th, 2013
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.51 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  * BuddyPress - Groups Loop
  5.  *
  6.  * Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter()
  7.  *
  8.  * @package BuddyPress
  9.  * @subpackage bp-default
  10.  */
  11.  
  12. ?>
  13.  
  14. <?php do_action( 'bp_before_groups_loop' ); ?>
  15.  
  16. <?php if ( bp_has_groups( bp_ajax_querystring( 'groups' )."&per_page=". apply_filters('kleo_bp_groups_pp', 12) ) ) : ?>
  17.  
  18.     <?php do_action( 'bp_before_directory_groups_list' ); ?>
  19.  
  20.  
  21. <!-- start -->
  22. <ul id="groups-list" class="item-list" role="main">
  23.  
  24.     <?php while ( bp_groups() ) : bp_the_group(); ?>
  25.                
  26.         <div class="four columns">
  27.           <div class="search-item">
  28.              
  29.             <div class="avatar">
  30.                 <a href="<?php bp_group_permalink(); ?>"><?php bp_group_avatar( 'type=thumb&width=94&height=94&class=' ); ?></a>
  31.             </div>
  32.  
  33.             <div class="search-meta">
  34.                 <h5 class="author"><a href="<?php bp_group_permalink(); ?>"><?php bp_group_name(); ?></a></h5>
  35.                 <p class="date"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?></p>
  36.             </div>
  37.             <div class="search-body">
  38.                 <div class="item-desc"><?php bp_group_description_excerpt(); ?></div>
  39.                
  40.                 <?php do_action( 'bp_directory_groups_item' ); ?>
  41.                
  42.         <?php if ( bp_group_has_members( 'group_id=&exclude_admins_mods=false' ) ) : ?>
  43.           <ul id="member-list" class="item-list">
  44.           <?php while ( bp_group_members() ) : bp_group_the_member(); ?>
  45.  
  46.             <li>
  47.               <!-- Example template tags you can use -->
  48.               <?php bp_group_member_avatar_thumb() ?>
  49.               <?php bp_group_member_link() ?>
  50.               <?php do_action( 'bp_directory_members_item' ); ?>
  51.  
  52.                                 <?php
  53.                                  /***
  54.                                   * If you want to show specific profile fields here you can,
  55.                                   * but it'll add an extra query for each member in the loop
  56.                                   * (only one regardless of the number of fields you show):
  57.                                   *
  58.                                   * bp_member_profile_data( 'field=the field name' );
  59.                                   */
  60.                                   bp_member_profile_data( 'field=Biography' );
  61.                                 ?>
  62.             </li>
  63.           <?php endwhile; ?>
  64.           </ul>
  65.  
  66.         <?php else: ?>
  67.  
  68.           <div id="message" class="info">
  69.             <p>This group has no members.</p>
  70.           </div>
  71.  
  72.         <?php endif;?>             
  73.                
  74.             </div>
  75.             <br>
  76.             <div class="action">
  77.                 <?php do_action( 'bp_directory_groups_actions' ); ?>
  78.                 <div class="meta">
  79.                         <?php bp_group_type(); ?> / <?php bp_group_member_count(); ?>
  80.                 </div>
  81.             </div>
  82.             <br>
  83.           </div>
  84.         </div>
  85.  
  86.     <?php endwhile; ?>
  87.  
  88. </ul>
  89. <!-- end -->
  90.  
  91.  
  92.     <?php do_action( 'bp_after_directory_groups_list' ); ?>
  93.  
  94.     <div id="pag-bottom" class="pagination">
  95.  
  96.         <div class="pag-count" id="group-dir-count-bottom">
  97.  
  98.             <?php bp_groups_pagination_count(); ?>
  99.  
  100.         </div>
  101.  
  102.         <div class="pagination-links" id="group-dir-pag-bottom">
  103.  
  104.             <?php bp_groups_pagination_links(); ?>
  105.  
  106.         </div>
  107.  
  108.     </div>
  109.  
  110. <?php else: ?>
  111.  
  112.     <div id="message" data-alert class="alert-box">
  113.         <?php _e( 'There were no groups found.', 'buddypress' ); ?>
  114.     </div>
  115.  
  116. <?php endif; ?>
  117.  
  118. <?php do_action( 'bp_after_groups_loop' ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement