Skip to:
Content
Pages
Categories
Search
Top
Bottom

Can you restrict which members are displayed in the members directory? S2Member

  • @abbie2636

    Participant

    Hi!

    I’m wondering if there is a way of only having paying members via S2Member displayed in the member directory? At the moment it appears that anyone who has registered on my site, whether they can actually access the members directory or not, are listed in the directory. I would like to create this a feature of my site but I don’t want non-paying members listed. I’ve searched through Buddy Press options and S2Member restrictions but haven’t been able to find an answer. Thanks, Abbie

Viewing 1 replies (of 1 total)
  • @shanebp

    Moderator

    Find out which S2 function returns member ids based on S2 levels.

    Then look at this function bp_has_members. It has include and exclude arguments.

    If you have more paying members than non-paying members, then pass the non-paying member ids to the exclude argument.
    Otherwise, pass the paying member ids to the include argument.

    You can adjust the bp_has_members call in your Members Directory template.

    Or you can write a function using this approach:
    https://codex.buddypress.org/developer/using-bp_parse_args-to-filter-buddypress-template-loops/

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