How to Add a Search Bar to Menu in WordPress
Editors Note: Do you need help with your WordPress site? Learn how you can get Unlimited WordPress Support 24/7 by U.S. based developers. Learn more
WordPress offers tons of great features to improve user experience. If you want to add a search bar to your menu in WordPress, then you have multiple ways to do so.
WordPress, by default, allows you to add a search bar in the widget-ready areas of a website. If you wish to add a search bar in the footer, sidebars, and other widget areas, you can do it easily.
However, when it comes to adding a search bar in the navigation menu, this may require you to install a plugin to help you achieve your goal.
Having a search bar in the navigation menu is useful for many reasons.
Users can easily find it and search for the content that they are looking for. There are many plugins to help you add a search function to the menu in WordPress.
Let’s have a look at how you can easily add a search bar to the menu in WordPress.
Add Search Bar to Menu in WordPress
A simple way to add a search bar is to install a plugin named ‘Ivory Search’ to your website.
- Navigate to Dashboard > Plugins > Add New.
Search for the Ivory Search plugin, then install, and activate the plugin.
Once you have installed and activated the plugin, you can move on to the next step for adding a search to the menu bar.
Step 1: Create Search Form
You will be able to see the Ivory Search tab in your WordPress dashboard. Go to Dashboard > Ivory Search > Search Forms.
The plugin already has a default search form for you so you can easily edit the form settings and place them in the menu bar.
All you have to do is to go through these settings and finalize your search form.
Here, you will be able to include the posts, pages, and any information that you wish users to search for. If you want to exclude specific pages or posts from the search results, then you can do so here as well.
It will show different post types including posts, pages, categories, and custom fields. There are various other options available as well, including Design and AJAX.
Once you are done with the settings, you can save the form and move on to the next step.
Step 2: Adding Search to Menu
In the next step, you will have to add a search to the menu bar.
- To do so go to Dashboard > Ivory Search > Menu Search.
Here, you will assign the search form to any menu locations your theme offers. You can also assign the search to the main navigation.
Once you have assigned the search form to your main menu, you can then save the settings.
Now, you will be able to see a search bar in the menu item that people can use to look for the information they need.
Once you have assigned the search form to your menu, you will be able to see multiple appearance settings for the search bar.
Here, you can select the menu search form style you want from different styles including drop-down, sliding, and popup.
You can also select the search icon color.
If you wish to add a menu title to display as a place holder, you can do so as well.
Focus on WordPress Site Maintenance
Here is a quick WordPress tip: If you are using too many plugins on your WordPress website, then it can create some compatibility and performance issues.
Learn more about AccessWP’s Unlimited WordPress Support service where we can help review your plugins and provide you recommendations on how to optimize your site.
You can also use this service to maintain your WordPress site, create daily backups, assist you with small tasks, and more. Get started today!
Now that you can easily add a search bar to your menu in WordPress, stay tuned to find more interesting and nifty WordPress tutorials to keep your WordPress up and running.