Have you ever needed to hide the search bar on your site? Me neither until the other day. The page needed to be plain Jane and this was one of the requests. Turns out, this is very simple to do. All that you need to do is add a Content Editor Web Part (CEWP) to your page and add the following lines of code to it:
<!—-Hide Search Bar——> <style> #SRSB { DISPLAY: none } </style> <!—-Hide Search Icon—–> <style> .s4-help { VISIBILITY: hidden } </style>
This code will hide both the search bar and the search icon. It’s that simple! Try it for yourself.
Stay Salty!
This works great for hiding all search boxes. Is there a way to hide the search box on the top navigation, but not any custom search web parts? Thanks!