Skip to:
Content
Pages
Categories
Search
Top
Bottom

Member widget – show random members possible?


  • Webmatter
    Participant

    @webmatter

    Hi,

    the member widget currently shows the newest registered member first. We have a buddypress site that is rather a group than an open community and would prefer to show random members instead.

    Is there a way to achieve this?

    Thanks for any tips!

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

  • Burt Adsit
    Participant

    @burtadsit

    Howdy. Sure there is but you’ll either have to change the bp core or create another widget that is a copy of the normal Members widget. The functional change is:

    Line 92 in /mu-plugins/bp-core/bp-core-widgets.php is the line:

    <?php $users = BP_Core_User::get_newest_users( $options ) ?>

    change that to:

    <?php $users = BP_Core_User::get_random_users( $options ) ?>

    Actually you’ll have to make more than that change to make your new RandomMembers widget work properly if you copy it and start editing it. It won’t be just a one line modification. You’ll be creating a whole new different widget that has to function properly. Up to you as to which path to choose.


    Webmatter
    Participant

    @webmatter

    Thanks so much! Exactly what we wanted … seems to work perfectly with the one line change.

    Now I will check and try to find out what else need to be changed :)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Member widget – show random members possible?’ is closed to new replies.
Skip to toolbar