Skip to:
Content
Pages
Categories
Search
Top
Bottom

Group List with Join Group Buttons


  • quigley05
    Participant

    @quigley05

    I’m having issues figuring out how to insert a group’s ‘join group’ button within a group list of my code. I need it inserted where the “joinbuttonhere” currently lives. I’m also curious if there is a way to have this list alphabetically as well? Code and example provided below. Thank you!

    https://obeii.com/cities-subscribed/
    login (testuser / test1234)

    <?php 
    $group_ids = groups_get_user_groups(bp_loggedin_user_id());
    foreach($group_ids["groups"] as $group_id) { 
    echo('<div class="city-item"><div class="city-item-content"><a title="" href="' . home_url() . '/' . groups_get_group(array( 'group_id' => $group_id )) -> slug . '">' .groups_get_group(array( 'group_id' => $group_id )) -> name . ', ' .groups_get_group(array( 'group_id' => $group_id )) -> description . '</a></div><div class="city-item-sub">' . joinbuttonhere . '</div></div>' . (end($group_ids["groups"]) == $group_id ? '' : ' ' ) ); } 
    ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Group List with Join Group Buttons’ is closed to new replies.
Skip to toolbar