1. Home
  2. Knowledge Base
  3. Customizations
  4. CSS
  5. How to Remove the Header on the Homepage for Logged-Out Users

How to Remove the Header on the Homepage for Logged-Out Users

Introduction

The homepage header is visible to all users by default, including those who are logged out. This guide explains how to remove the header on the homepage for logged-out users, creating a cleaner landing experience for visitors who are not logged in.

Custom Workaround

Before proceeding, make sure you have a complete site backup.

  1. Go to BuddyBoss > Theme Options in your WordPress admin dashboard.
  2. Open the Custom Codes section.
  3. Enable CSS.
  4. Add the following CSS code:
body.home:not(.logged-in) .site-content {

    padding-top: 0px;

}

body.home:not(.logged-in) header#masthead {

    display: none;

}
  1. Click Save Changes.

Note: Any modifications like this are considered custom work. Please review the BuddyBoss Support Policy for details.

Troubleshooting and FAQs

Q: The header is still showing after adding the CSS.
A: Clear your site cache and browser cache, then reload the homepage.

Q: Will this affect logged-in users?
A: No. This only hides the header for users who are not logged in.

Q: Can I restore the header later?
A: Yes. Remove the CSS code and save your changes.

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.