Skip to:
Content
Pages
Categories
Search
Top
Bottom

Exclude admin from all Group Member loops, except for one


  • 0bservator
    Participant

    @0bservator

    As an admin I’m the one who creates all the groups in our Buddypress installation. The groups represent the different departments in our company.

    I don’t want to appear on every group page, so I exclude myself using the exclude_admins_mods parameter (which is default true). But I am part of a department in our company and I want to show up in the corresponding Buddypress Group.

    Does anyone have a solution for that?

Viewing 1 replies (of 1 total)

  • 0bservator
    Participant

    @0bservator

    Guess I can check if the current group ID corresponds with the group I am in.

    <?php 
    
    // Let's say my group ID = 1
    $exclude_admins_mods = (bp_get_group_id() == 1) ? 0 : 1;
    if (bp_group_has_members(array('exclude_admins_mods'=> $exclude_admins_mods))) : 
    
    /* Member details */
    
    endif;
    
    ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Exclude admin from all Group Member loops, except for one’ is closed to new replies.
Skip to toolbar