How to hide SharePoint search box conditionally
SharePoint search box is in the suite bar at the top of every page and Microsoft allows site collection administrators to hide it using PowerShell. While this method is suitable for most scenarios it does not allow to hide the search box conditionally for certain pages or for all pages with the exception of Lists and Libraries.
In this blog post I’ll explain how to hide the search box using the official method provided by Microsoft and two workarounds to hide the search box conditionally so you can overcome the limitations of the out of the box settings.