Introduction
By default, BuddyBoss does not provide an option to hide the Profile Search widget in the Members Directory for logged-out users. Using a simple CSS snippet, you can prevent non-logged-in visitors from accessing the profile search, helping limit directory interactions to logged-in members only.
Custom Workaround
Follow the steps below to hide the Profile Search for logged-out users:
- Go to BuddyBoss > Theme Options
- Under Custom Codes, enable CSS
- Append the following:
body:not(.logged-in) aside#bp-profile-search-form-outer.bp-profile-search-widget.widget { display: none; }- Save changes.
Troubleshooting and FAQs
Q: Will this remove the Members Directory entirely for logged-out users?
A: No. This only hides the Profile Search widget. The Members Directory itself will still be accessible unless restricted separately.
Q: Logged-in users can still use the Profile Search, right?
A: Yes. This CSS targets logged-out users only and does not affect logged-in members.
Q: The Profile Search is still visible after adding the CSS. What should I do?
A: Clear your site cache and browser cache. If it still appears, submit a ticket to the support team for assistance.
Q: Does this apply to mobile devices as well?
A: Yes. The snippet works across all screen sizes unless overridden by other custom CSS or theme rules.
Q: Can I hide the Profile Search only on specific pages?
A: Not with this snippet alone. Targeting specific pages would require additional selectors or custom development.