header.phptemplate file. This snippet will show the search input in the header area on every page of our site.
header.phpplace the search input snippet you copied from before where you would like it. In our example we are removing all mentions of the default Wordpress site search and placing our search-input snippet after the
has_nav_menu()function and before the
header.phptemplate file and on every page on our site:
page-search.phptemplate file where we want the search results to render. In our example we are placing it right after the
get_header()function in the main body of our page template.
search-inputcode snippet any search from the site's header will take us to our new search page: