I am developing a custom design in SharePoint 2013 oslo master page. I have successfully designed with top navigation and content part. And I need to place it's default search box into header section(center in header). But I can't figure out how to do that. Any help would be appreciated. Thanks.
You can do this using Snippets in SharePoint 2013.
After you convert a master page or create a page layout, you have an HTML version of that page. With the Snippet Gallery, you can quickly add specific SharePoint functionality, such as search or navigation or device channel panels, to the HTML file associated with your master page or page layout.
To do this, perform following steps.
- Go to
Edit Master Page--> Click on your Master Page.
- Your Master Page will open in preview Mode. Click on
Snippetsin the upper right section on the page, which will open Snippet Gallery.
- Now in the ribbon (Design tab), select
Search Box. You able to see Search Box webpart with section to update its properties and HTML Snippet Section where HTML of the web part is shown.
- Copy / Paste HTML Snippet in your master page in the particular section of the master page(e.g. Header).
- Save and Publish your master page. You will be able to see the Search Box web part in the Header of your master page.
For more info on this, please refer this MSDN article.