Skip to:
Content
Pages
Categories
Search
Top
Bottom

Showing random group members

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

  • r-a-y
    Keymaster

    @r-a-y

    bp-dev.org references an outdated version of BuddyPress.

    There currently does not appear to be a random parameter for the group members loop.

    One way around this is by using BP_Groups_Member::get_all_for_group() combined with a regular members loop.

    With BP_Groups_Member::get_all_for_group() (available in /bp-groups/bp-groups-classes.php). Pass your group ID and it will return an array. One of the items in the array is the member IDs. You could then randomize the IDs yourself to a regular members loop:
    https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-members-loop/

    Could also experiment with the `type` parameter with the “random” argument.


    embergermedia
    Member

    @embergermedia

    @r-a-y

    Well, that is handful! I’m not sure where to even begin to combine the two types of loops. I’m willing to get my hands dirty with code, but need a hint as to how to get started. Any suggestions?

    Thanks for the reply!


    embergermedia
    Member

    @embergermedia

    small bump. :)

    I like Rays idea.. anybody have an idea of how to implement it? Thanks


    embergermedia
    Member

    @embergermedia

    Bump number 2. Any other help? Thanks

    @r-a-y any more advice? Thanks


    embergermedia
    Member

    @embergermedia

    @r-a-y yes this is the original thread. However, the other thread I opened was more specific. So I still have an unanswered question. I was hoping that since you gave a ray (no pun intended) of hope that it could be accomplished, that perhaps you could offer guidance on how to accomplish it.

    I have googled for the last month on this, and can’t create the solution by myself. So i am still asking for help.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Showing random group members’ is closed to new replies.
Skip to toolbar