1. Home
  2. Knowledge Base
  3. Customizations
  4. CSS
  5. Hide Documents Download for Logged-out Users

Hide Documents Download for Logged-out Users

Introduction

By default, BuddyBoss does not offer an option to restrict document download for logged-out users. You can use a CSS snippet to hide the download buttons, ensuring only logged-in members can access them and keeping your content secure.

Custom Workaround

  1. In your WordPress admin, go to BuddyBoss > Theme Options
  2. Under Custom Codes, toggle Enable CSS to On
  3. Paste the following CSS:
body:not(.logged-in) #media-folder-document-data-table .media-folder_action__list .download_file,

body:not(.logged-in) #media-folder-document-data-table .media-folder_action__list .copy_download_file_url,

body:not(.logged-in) #buddypress.bb-media-model-wrapper.document-theatre .activity-list.bp-list .download-document {

    display: none;

}
  1. Click Save Changes

Note: Any custom code is considered “custom work.” Please review our Support Policy for more details.

Troubleshooting and FAQs

Q: Logged-out users can still see the download buttons, what should I check?

A: Clear your site cache, caching plugin, or CDN cache. Ensure the CSS was pasted exactly as shown and that Enable CSS was turned on before saving

Q: Will this hide downloads for all document types?

A: Yes. This CSS targets all document download buttons for logged-out users in activity feeds and media folders

Q: Can I allow downloads for specific users or roles?

A: This CSS only differentiates between logged-in and logged-out users. For role-specific restrictions, a plugin or custom PHP code would be required

Q: Who can I contact for further assistance?

A: Submit a support ticket through your BuddyBoss account dashboard for personalized help

Was this article helpful?

Related Articles

Subscribe to Our Newsletter

Stay In Touch

Subscribe to our Newsletter, and we’ll send you the latest news from BuddyBoss

This field is for validation purposes and should be left unchanged.
This field is hidden when viewing the form

To speak to our Agency consultant, fill in the form found at our Contact Page.