Skip to:
Content
Pages
Categories
Search
Top
Bottom

Trying To Sort Group Members By Last Active or Really Anything Else.

  • Avatar of armandmorin
    armandmorin
    Participant

    @armandmorin

    I’m trying to create a simple widget to show members of a specific group. I have the basics down, but I want sort them by last active or even randomize them. Any ideas?

    Here’s what I’m using now in the widget…

    <?php if ( bp_group_has_members('type=newest&group_id=1&per_page=16') ) : ?>
    
    <?php while ( bp_group_members() ) : bp_group_the_member(); ?>
    
    <a href="<?php bp_member_permalink() ?>" title="<?php bp_member_name() ?>"><?php bp_group_member_avatar_thumb() ?></a>
    
    <?php endwhile; ?>
    <?php else: ?>
      <div id="message" class="info">
        <p>This group has no members.</p>
      </div>
      
    <?php endif;?>

    Type doesn’t work on this.

You must be logged in to reply to this topic.