Skip to:
Content
Pages
Categories
Search
Top
Bottom

Show a list of forum moderators


  • athep
    Participant

    @athep

    Hello,

    I’m trying to get a list of the current forum’s moderators, I have this argument that filters all the users and lists me all the moderators from all the other forums.

    $args = array( 'role' => 'bbp_moderator');

    The above code lists all of the moderators from all the forums, I only want the moderators of the current forum, any parameters or snippet that could help me?

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

  • athep
    Participant

    @athep

    For anyone looking for a solution, it’s as simple as calling

          <?php
            echo '<pre>';
            print_r(bbp_get_moderators(bbp_get_forum_id()));
            echo '</pre>';
          ?>

    Or you could echo bbp_get_moderator_list(bbp_get_forum_id()); for a simple list of moderators. Remember to put it inside the loop!


    Robin W
    Moderator

    @robin-w

    thanks for sharing the solution 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar