How to add a people search filed in SharePoint 2013 .master page



The other day i was about to add a people search filed in a customers master page so that they could get both people search and information search in the ribbon. I looked around on the internet for a very long time without finding a good solution. So now i share mine. 😉

(You should not do this in you production environment using SharePoint designer as that is never a good strategy! Use Visual studio and deploy to a dev/UAT and when it works fine, deploy your .WSP to production. I will say this 1000 times more 😉

  1. Open you master in Visual Studio. (!!Add jQuery to your master page)
  2. Pic your location for the People search, i put both search fields after id=”s4-ribbonrow” and moved up the information search box there as well.
  3. This is my full code, i have commented the code to make it is simpler to understand. Ooo and if you can write the code better, please don’t hesitate to comment 🙂

Last but not least you need some CSS to make it look better.

Leave a Reply

Your email address will not be published. Required fields are marked *