This topic has 7 replies, 2 voices, and was last updated 10 years by themeforest.

  • Author

    Tagged: 

  • #13972
     themeforest
    Participant

    Hi: Can you recommend how I may exclude certain member type from the Member’s Directory?

    Here for example, I want to exclude ‘administrators’ and ‘group leaders’ from showing up on this list – and only allow those with ‘administrator’ and ‘group leaders’ with access to the full list.

    http://seventhqueen.com/themes/kleo/members/

    #13994
     sharmstr
    Moderator

    google ‘exclude members from buddypress directory’. This is a common request in the buddypress forums. If you get stuck, hit me up and I’ll see if I can help.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #14000
     themeforest
    Participant

    hi sharmstr – thanks! i reviewed the forums and found one guidance that seemed to work for many. Here for example, meg@info suggested an easy solution, however, I get an error message when I run it. Source

    Basically, I add this code to functions.php :

    https://gist.github.com/dzmounir/8285459

    the author noted no need to edit any template files and to just change the query by putting the role ids to hide.
    $excluded_roles = array( ‘administrator’, ‘subscriber’ );

    however, I’m thinking this file has custom code to make the awesome Kleo theme 🙂
    Can you suggest where I can include the above?

    #14001
     themeforest
    Participant
    #14004
     sharmstr
    Moderator

    Worked fine for me. put it in /kelo-child/functions.php.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #14005
     themeforest
    Participant

    you’re the best! thanks @sharmstr!! Putting it in kelo-child worked 🙂

    #14006
     sharmstr
    Moderator

    No problem. Dont ever modify files in the Kleo directory. If you need to, copy the file you need to modify to the kleo-child directory. None of those files will be touched during updates.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #14007
     themeforest
    Participant

    Definitely! thank you for the guidance, hats off to you 🙂

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Exclude members from Member's Directory’ is closed to new replies.

Log in with your credentials

Forgot your details?