Skip to:

How to hide members by user role from the Buddpress directory

  • stephunique


    I know this question has been asked before, but I am not a dveloper and the previous solutions are either old or not easily understood.

    The best way to hide certain members from the Buddypress directory seems to be using the codes found here:

    My problem is, there is a lot of discussion around the code and there has not been a definitive answer that is non-developer friendly, so I hope someone could provide one here that would benefit everyone with the same question.

    The original code had several alterations (eg, when someone said to replace one part of the code with another, or mistakes on a certain line, and finally, an altered code that hides all but one role, which is what I want) but none specify exactly where to put it or what part to replace, or where to put the user roles you want to hide or show.

    So I am hoping someone here can provide a definitive answer about how we can hide all user roles except one (my case), or, what others might find useful, how to hide a single or a few user roles from the directory. The last code is what I need but I don’t know if I am supposed to use that as is, or if it replaces part of the original code (and if so, what part), and where to add the user roles I want to hide or include.

    Thank you.

Viewing 1 replies (of 1 total)

  • thinlizzie


    That code you linked to is certainly a big confusing mess of errors, rewrites, suggestions etc.

    Best if you visit the forum on the Buddydev website, which is operated by Brajesh who wrote that original code snippet. You will get a definitive answer there.

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