How to change the text that is displayed in the Search Box Web Part in SharePoint Server 2013

This is a blog post in the series "How to change how search results are displayed." To demonstrate how you can customize your search results, I'll use examples from an internal Microsoft Search Center.

For an overview of the blog posts in this series, go to How to change the way search results are displayed in SharePoint Server 2013.

In the previous blog post, I showed you how to add a custom action to the hover panel. This blog post will be short & sweet, so let’s get right to it.


How to change the text that is displayed in the Search Box Web Part

The screenshot below shows the default text that is displayed in the Search Box Web Part.

Default text in the Search Box Web Part

Here’s what you should do to change this text:

  1. In your mapped network drive, go to Display Templates –> Search, and open the file Control_SearchBox.
  2. Replace the value for the promt variable with the text that you want to display. Enclose the text in quotation marks.

    The following screenshot shows how I changed this in my Search Center scenario.

Change text in display template

  1. Save the file.

In the Search Center, you can now see the new text.

New text in the Search Box Web Part


So that’s it for this series. If you are planning to modify how search results are displayed in your Search Center, I hope you’ll find the information in this series helpful.

Comments (26)

  1. Anonymous says:

    This whole guide has been great, utilizing the search with these handy tips will bring smiles on our users lips throughout the whole year 🙂

  2. akshay_kathuria says:

    hi bella,
    Can you guide about the paging in search results webpart?
    I do not want the paging control to add #k and #s in the url.

  3. Bella_Engen says:

    Hi YurillA,

    I’ve never come across this type of behavior. And I agree that is seems really strange…
    I suggest that you contact Microsoft Support for further assistance.


  4. Bella_Engen says:

    Hi Kesari,

    It’s difficult to say what your exact issue could be, but have you configured WAC? If not, see this article for more information:

    Hope this helps.


  5. VarunVerma says:

    Hi, Nice Work.
    How can we display the {searchTerms} in our display Templates? Is their any managed property? I don't want to use javascript to fetch k's value from url. Please advice

  6. Bella_Engen says:

    Hi Gonzalo,

    The features that I describe in this series are only available for private sites, such as Team sites, in SharePoint Online. For more information, see this blog post:


  7. Bella_Engen says:

    Hi Abhishek,

    I haven’t done this myself, but maybe the article Integrating location and map functionality in SharePoint 2013 could help (


  8. Bella_Engen says:

    Happy to hear that 🙂

  9. Bella_Engen says:

    Hi Jasi,

    I’m sorry, but I don’t know if this is possible.


  10. Bella_Engen says:

    Hi VarunVerma,

    Have you tried using the query variable {SearchBoxQuery}?


  11. Bella_Engen says:

    Hi Alex,

    Can you verify that you don’t have any syntax errors, and that you have modified the correct display template? If this is the case, and it still doesn’t work, then I suggest that you contact Microsoft Support.


  12. Bella_Engen says:

    Hi akshay,

    The #k and #s are in the URL so that users can copy the URL of a specific search results page and send it to other users. The receivers will then will be able to enter the URL in their browser, and see the exact same search results page.

    If you don't want the #k and #s in the URL, you'll have to implement custom paging controls.

    Hope this helps,


  13. Thank you so much..Really cool stuff..Please keep it coming

  14. Bella_Engen says:

    Hi Adil,

    Thanks for the feedback 🙂 Glad you like it.


  15. KumarJee says:

    Cool.. could you please guide me i want to use my SearchApi (based on Lucien search ) in the share point search. so the result will be display from my searchApi and other function search result and refiner will work as it is.

  16. Raj K says:

    Hi Bella, Really a nice article about display templates.keep up the good work..

  17. Kesari Suresh says:

    very Informative article. One observation When you hover on a result in your custom search results web part, I do not see a document Preview panel? I am also experiencing the same issue.
    I created a custom Item Display Template based on default item template but not able to get the document preview over the hover panel.
    Iam able to view the document preview with default item display template.

    Can you assist with some valuable inputs.
    Thank You.

  18. J. Hawkins says:

    Worked like a charm thanks!!

  19. Hi Bella, This is great information, thank you! Do you know if this workaround can be used in SharePoint Online (Office 365)? I followed the steps above but had no luck. Any thoughts? Thanks, Gonzalo

  20. YuriIIA says:

    I came across a rather strange issue and I've been shooting in the dark to try fix it. I have a search box that sends the user to a results page where the results are shown in a search results web part. This works fine except when the search is done by an anonymous
    user. In this case, when the anonymous user types in a search term and performs the search, the keyword they searched for seems to get cached or unchanged. For example, if I go to the site anonymously and search for "books", I see results for books and I see
    the search box showing "books". A moment later if I search for "magazine", I still see results for "books" and I see the search box showing "books". Basically, the search box reverts to showing the first thing an anonymous user searches for no matter what
    they type into it after the first search.
    Any ideas on what could be causing this behavior with the search box?

  21. alex says:

    This did not work for me. It still displays Search…

  22. Jasi says:

    Hi Bella,

    Can we change the default text shown in the Small Search box

  23. Abhishek says:

    Hi Bella, Nice series. Can you tell me if it is possible to display search results on Bing Maps.

  24. KI says:

    Probably one of the best series I have ever come across in over 15 years. Thank you so much.