Removing search icon from the header

To make a long shory short, I need to remove the search icon and the search functionality from a website I am working on, as the owner wants to use only Google CSE.

I understand how to add links and buttons - but what is the proper way to remove buttons from the header with the new Discourse API?

Thanks!

I don’t know how to remove search function, and I think it is hard to remove it from whole discourse

easy way is hide search icon in header :smiley:

a#search-button.icon {
    display: none;
}
4 Likes

Agreed.

Technically users could go into the dev tools, find the rule, and uncheck the display none and then use the Discourse search.

But I seriously doubt many would. In fact I think if you used a less obvious selector that the owner would never become aware of it. eg.

div.panel ul.icons li:first-child {
 display: none;
} 

I don’t understand the request, IMHO Discourse search works great. I’m guessing the owner has been listening to some SEO snake oil.

9 Likes

Hello - thanks for the tips. I have in fact hidden it with CSS, so far.

Indeed Mittineague, I also like Discourse’s search - especially coming from the horror that search was in other forum software I have worked with for years. It just has to do with specific needs (in this case the owner wants a search that spans 3 different domains/websites he owns, not just discourse).

Thanks for your response!

3 Likes

The search would still be available from the / keystroke, though, wouldn’t it?

3 Likes

Yes, so much for being less obvious.

div.search-menu div.panel-body, 
#keyboard-shortcuts-help div div:nth-child(2) li:nth-child(5), 
div.panel ul.icons li:first-child {
 display: none;
}

the search form input modal
the keyboard help reference
the nav icon

2 Likes

Thank you everybody :wink:

2 Likes