Skip to:

disable member directory except via search

  • Gabe462


    I’m seeing a lot of variations on filtering the member directory, but not quite this one- I want to prevent members directory from being shown except by direct searches.

    I also I want to prevent the query from occurring w/o search to save the DB call. Any pointers?

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

  • danbp


    Hi @gabe462,

    the members directory shows by default all members.
    The search field on this directory let you find a user, and if one is find, BP shows the username linked to this member profile.

    The member loop is a core component and cannot be deactivated. But you can remove anything from the directory template.

    Why want you go to the directory, which you don’t want to use, if the final result is to see the searched member ? Go directly to this member profile. 😉

    You can try to modify the template to simplify it so far as possible and only use the member search on the (ex) directory page.

    bp-templates/bp-legacy/buddypress/members/index.php contain the member search field

    Copy both directory (starting by /buddypress/ ) and files into your child-theme (to get /your-child-theme/buddypress/members/index.php) and try to remove what you don’t want to see.

    Without waranty, i’ve never tested this.



    The final product will allow members the choice of being displayed publicly. While we’re in a functional alpha state, we’re members members visible only by search. Politics and policy…

    So how can I pre-load the search into the template (perhaps a query string that will not exist so as to return none) such that it will be overridden by a manual search?

    I’ve already got my files in the right places, thanks for checking 😉

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘disable member directory except via search’ is closed to new replies.
Skip to toolbar