Removing search icon from the header


(Magnetidog) #1

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!


(Nam Nguyen) #2

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;
}

(Mittineague) #3

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.


(Magnetidog) #4

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!


(Eli the Bearded) #5

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


(Mittineague) #6

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


(Magnetidog) #7

Thank you everybody :wink: