Add A Search Bar To WordPress Menu
June 26. 2020
There is hardly a web design guide out there that won’t recommend you adding a search bar to the WordPress menu. Having one is necessary for both easy navigations and for allowing your viewers to access old content with relative ease. And, if you manage to integrate it properly, you will ensure that your website is a joy to visit. So, without further ado, let’s take a closer look at how to add a search bar to the WordPress menu.
Why you should add a search bar to the WordPress menu
Even a bit of online experience will tell you that navigating a website without a built-in search bar is a drag. If you are looking for a piece of information you are either forced to search through the website, which gets really old, really fast. Or, if you are more experienced, you use Google to search the website. The difficulty here (for the website owner) is that you can easily find something more suitable while you are on Google.
Furthermore, the website owner can pretty much forget you continuing to read if you’ve found what you need. So, if you want to keep your viewers on your website, which is highly important for getting quality traffic, you need to add a decent search bar to WordPress.
Step-by-step guide for adding a search menu to WordPress
So, how do you go about adding a search menu to WordPress? Well, the process of doing so is pretty straightforward. In essence, there are two ways you can go about it. You can add it through the widget menu in WordPress. Or, you can use one of the many plugins to either add a premade search bar or create one of your own. If you do go with a plugin, remember to update them regularly.
Using the Widget Panel
The fastest way to add a search bar to the WordPress menu is to go through the Widget panel. To do this you need to:
- Head on to your Admin Dashboard.
- Now click on the Appearance button on your left side.
- Navigate to Widgets.
- Once the Available Widgets panel opens up, find the Search option.
- Click on it, and then click on Add Widget.
And presto. You can go to your website and see that you’ve successfully added a Search bar.
Using a plugin
While going through the Widget Panel is fast, it doesn’t leave you with many options for design and layout. So, to help mitigate this, you can use a plugin to install a Search menu in WordPress. To do this, you’ll need to:
- Head on to Plugins and select Add new.
- Here you will have to find a plugin that you want to be installed. Later on, we will go over some that we consider worth checking out. But, for now, try typing in “add search menu” and see what comes up.
- Install the selected plugin.
- Head on to Settings and then click on plugin if you want to configure it.
Create your own search menu (for advanced users)
For this, you will need a bit of know-how regarding web design. But, if you know your way around a basic website, this should be pretty straightforward.
- Figure out where you want the Search Bar to go (the most common choices are the header or the sidebar of the website).
- Then either open the header.php file or the sidebar.php file, depending on your choice.
- Now add the <?php get_search_form(); ?> function to your code. It is going to call the search form by going to your search form template. If you don’t have one, worry not. The function creates one by default.
- If you now go to your website you will see that there is a Search box on the menu. If you added the function in the header.php, it will be in the upper panel. Or, if you added it to the sidebar.php, it will be in the side panel.
- To optimize your search box, you simply need to open the style.css file and alter the search-from. You can alter it’s style, position, or size according to what you want.
Which plugins to check out
Before we go over our pick of plugins in is worth noting that adding a search bar to a WordPress website is not all about the looks. Having a decent running search bar is one of the most organic ways to make your website pleasurable to navigate. With a good search bar, visitors will be motivated to stay on your website for much longer then they would without it. Unfortunately, there is no “best search bar plugin” that you can use for every website. Instead, you need to find the one that is best suited for your website and the content you have on it. With this in mind, here are a couple worth checking out:
- ACF: Better Search – If you haven’t dealt with WordPress search plugins, this is the one you should start off with. It’s light, easy to use, and quite efficient.
- Ajax Search Lite – If you are looking for a more advanced, but still user-friendly search plugin, Ajax Search Lite is definitely worth checking out. It is especially useful for mobile use, and you can connect it to Google Analytics. The last feature is especially useful for SEO optimization.
- Ivory Search – As it is of the more popular search plugins, we feel it necessary to mention the Ivory search. This efficient, user-friendly plugin comes with a ton of features. With it, you’ll be able to make an unlimited number of search forms and configure each of them separately.
- Swiftype Site Search – The final plugin we are going to mention is the Swiftype Site Search. It comes with a bunch of easy-use features that are bound to help you out. With it, you can tackle typos, phrase matching, and synonyms, with ease.