Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] groups_get_group_members() – 'exclude_admins_mods' parameter


  • Iurie Malai
    Participant

    @flegmatiq

    To display members of a group I use the groups_get_group_members() function. But, by default, this function excludes from listing the admins and mods. I know there is a parameter exclude_admins_mods (true by default) that can help to include admins and mods in displayed list of members, but I do not understand how to use it. I tried some variants but without success. Can anybody give me a working example?

Viewing 2 replies - 1 through 2 (of 2 total)

  • 0bservator
    Participant

    @0bservator

    <?php $args = array(
    'group_id' => bp_get_group_id(),
    'exclude_admins_mods'=> 0
    ); ?>

    In the default groups loop:

    <?php if (bp_group_has_members($args)) : ?>
    // member details
    <?php endif; ?>

    or when you use the groups_get_group_members() function:
    <?php $groups_get_group_members = groups_get_group_members($args); ?>


    Iurie Malai
    Participant

    @flegmatiq

    @0bservator Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] groups_get_group_members() – 'exclude_admins_mods' parameter’ is closed to new replies.
Skip to toolbar