Skip to:

How to show all members regardless of activity

  • nyodulf


    I have a members site owned by a client who wants all members to be visible in members lists, even if they have never been active.

    The site is kind of a directory and the members who do use it need to be able to find info on the other members, even if those others don’t use the site – things like finding all members in a city.

    I know that the ‘alphabetical’ filter will show all members, but there are over 800 people using the site and growing, and the question constantly comes up “why am I not seeing X?”, no matter how many times I explain it.

    How can I change the “Last Activity” filter so that it includes those members who have never been active?

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

  • danbp


    Why not making your member directory alphabetical by default ?
    Add this to members-loop placed in /child-theme/buddypress/members/members-loop.php:22

    <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) . 'type=alphabetical' ) ) : ?>

    Members Loop

    – member must be approved (by validation mail or admin action) to appear in the list.
    – default behave is that a new member only appear on directory after his first login.



    Thanks for the reply danbp. I can’t tell from looking at it whether your code:

    1. Forces all the loop to be alphabetical regardless of what the user selects, or
    2. Just makes the loop default to alphabetical

    The problems are:

    1. If it always returns alphabetical, users can’t choose to sort by Last Active, which some will want to.
    2. If it just makes alphabetical the default, it doesn’t solve the problem because users will choose to sort by “Last Active” and then not see the information they need.

    I really need to be able to make sure that all members are visible regardless of what the user does while still allowing the normal functionality.



    1) With that code, the directory output will be alphabetical by default and the filter continue to work as before. The default select “last active” doesn’t change unless you do it manually in the template.

    2) see 1) !



    I also need to do this, but for some reason when I replace line 22 with this:

    <?php if ( bp_has_members( bp_ajax_querystring( ‘members’ ) . ‘type=alphabetical’ ) ) : ?>

    or, per another topic on here, this:

    <?php if ( bp_has_members( bp_ajax_querystring( ‘members’ ) . ‘&type=alphabetical’ ) ) : ?>

    I get fewer members returned. Looks fine to me though, so I’m not sure what’s going on though.

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