Created
August 4, 2014 13:05
-
-
Save BoweFrankema/650ff1e530f0d3f30508 to your computer and use it in GitHub Desktop.
BuddyPress Groups Loop with specific groups based on ID
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'include' => "4,5,2", | |
'max' => 5 | |
); | |
if ( bp_has_groups( $args) ) : | |
?> | |
<ul id="groups-list" class="item-list"> | |
<?php while ( bp_groups() ) : bp_the_group(); ?> | |
<li> | |
<div class="item-avatar"> | |
<a href="<?php bp_group_permalink() ?>"><?php bp_group_avatar( 'type=thumb&width=50&height=50' ) ?></a> | |
</div> | |
<div class="item"> | |
<div class="item-title"><a href="<?php bp_group_permalink() ?>"><?php bp_group_name() ?></a></div> | |
<div class="item-desc"><?php bp_group_description_excerpt() ?></div> | |
</div> | |
<div class="clear"></div> | |
</li> | |
<?php endwhile; ?> | |
</ul> | |
<?php else: ?> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment