How to Hide the Global Search Bar on the Salesforce Community Builder Header

If you are using the Napili template in Salesforce’s Community Builder, you know that they create a pretty standard header for your site that includes your company logo, the global search bar, and a navigation widget.  You can choose in Settings to hide the entire header all together (if you want to make your own), however, there’s no option to remove individual components.

Here’s how you can hide the global search bar and the navigation widget from the view:

From the Community Builder, click on the Pencil icon next to “Branding Editor” at the top of the sidebar.

Screen Shot 2016-02-24 at 8.13.06 AM.png

 

In the Edit Custom CSS window, enter the following:

.body-search{
    display:none;
}

.selfServiceProfileMenu{
    display:none;
}


Click Save and go back to your builder to see the elements removed from the page.

It’s important to note that this isn’t best practice since we’re overriding standard Salesforce classes, however if you don’t want to get involved in creating a custom Lightning Component to replace your standard header (which will be covered in another post), this is a quick and easy option.

 

 

Advertisement

One thought on “How to Hide the Global Search Bar on the Salesforce Community Builder Header

  1. Using “display:none” on Search but keeping the Profile Menu results in the Profile Menu moving next to the Company Logo, which looks kind of bad. So rather than “display:none”, I used “visibility:hidden”, which kept the Profile Menu nicely to the right.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s