How to hide search control on default.master

Summary:

This post describes how to hide the search control on default.master. The steps described below are applicable for other master pages, as well.

Resolution:

  1. Open SharePoint Designer 2007. Go to File | Open Site and connect to SharePoint site.
  2. Expand out _catalogs -> masterpage -> open default.master. Check out file, if necessary.
  3. In Code View, search for "PlaceHolderSearchArea". After id="PlaceHolderSearchArea", add the following property: Visible="false". In all, the code should look something like:
    <asp:ContentPlaceHolder id="PlaceHolderSearchArea" Visible="false" runat="server">
            <SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox"/>
    </asp:ContentPlaceHolder>
  4. Save master page, check in (if necessary), and publish major version.

NOTE: To reverse the changes, simply set Visible="true" on the placeholder.

I decided to write this post as we've seen several support cases with questions on how to hide / manipulate the search control on master pages. This post just covers hiding the search box. There are multiple ways to hide the search control, to be sure, including using CSS (ex: "display:none;").