Do you want to add a search bar to your WordPress navigation menu?
By default, WordPress lets you add search to your website’s sidebar, footer, and other widget-ready areas. However, many users prefer to have the WordPress search box in the navigation menu because it is easier for visitors to find.
In this article, we will show you how to easily add a search bar to your WordPress menu without having any coding knowledge.
Why Add a Search Bar to the WordPress Navigation Menu
A search bar makes it easy for your users to find what they’re looking for without leaving your WordPress website. It helps improve the user experience and boosts engagement.
This is why most website designers and experts recommend adding a search option in the navigation menu, so users can easily find it. However, by default you can only add the WordPress search widget to widget-ready areas such as the sidebar.
In this guide, we’ll use the free SearchWP Modal Search Form. It’s easy to use, looks great with any theme, and won’t have a negative impact on your website’s performance.
With that said, let’s see how to add a search bar to your WordPress navigation menu.
Adding a Search Bar to WordPress Navigation Menu
Upon activation, you need to visit Appearance » Menus to add the search page to your WordPress menu. Once there, make sure you select the Primary menu.
Next, click on SearchWP Modal Search Forms to see the menu’s settings. Here, you can see that the plugin has automatically added the default ‘Native WordPress’ search template.
You can go ahead and select ‘Native WordPress’ and then click on the ‘Add to menu’ button.
WordPress will now add the new Native WordPress Modal Search Form to the right-hand column. You can give the section a click to expand it and see its settings.
It’s a good idea to change the navigation label to ‘Search’ so your visitors know that this is a search field. Then, click on the Save Menu button to save your changes.
Now, if you visit your WordPress blog, you’ll see a new Search bar in the navigation menu.
The search box will automatically take on the appearance of your WordPress theme, as you can see in the following images.
Adding Ajax Powered Live Search
You can make your search form even more user-friendly by adding live search results using Ajax technology. This will automatically show the visitor relevant search results as they’re typing their query, just like you see with Google.
Once activated, the plugin will automatically add live search to all of your forms without you having to configure any settings.
To see the live Ajax search in action, simply visit your WordPress website and type in a search query. The search results will show up as you type.
This is a great start, but there are ways to create an even more powerful search experience for your visitors. For more information, see our complete guide on how to improve WordPress search with SearchWP.
We hope this article helped you learn how to add a search bar to a WordPress menu. You may also want to see our expert pick of the best live chat software for small businesses or see our list of useful tips to speed up WordPress and boost performance.