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.
- Go to BuddyBoss > Theme Options in your WordPress admin dashboard.
- Open the Custom Codes section.
- Enable CSS.
- Add the following CSS code:
body.home:not(.logged-in) .site-content {
padding-top: 0px;
}
body.home:not(.logged-in) header#masthead {
display: none;
}- Click Save Changes.
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.