Created
September 24, 2014 17:01
-
-
Save shanebp/dd7186f4997ee3c48785 to your computer and use it in GitHub Desktop.
buddypress - list the groupsthat someone else has created but I have joined
This file contains 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 if ( bp_has_groups( 'type=alphabetical&user_id=' . bp_loggedin_user_id() ) ) : ?> | |
<ul> | |
<?php while ( bp_groups() ) : bp_the_group(); ?> | |
<?php if( bp_get_group_creator_id() != bp_loggedin_user_id() ) : ?> | |
<li> | |
<div> | |
<a href="<?php bp_group_permalink() ?>"><?php bp_group_avatar_thumb() ?></a> | |
</div> | |
<div> | |
<div class="item-title"><a href="<?php bp_group_permalink() ?>" title="<?php bp_group_name() ?>"><?php bp_group_name() ?></a></div> | |
</div> | |
</li> | |
<?php endif; ?> | |
<?php endwhile; ?> | |
</ul> | |
<?php else: ?> | |
<div class="error">No current groups.</div> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment