One of the best and easiest things you can do to make your content discoverable is to add a custom search bar in WordPress.
Today, a business owner is challenged to keep up with the beat of not only the technology advancement but with the demands of their customers.
If you are reading this article, then you have in some way kept up, you have a website or blog that routinely churns out content in the form of blog posts in your WordPress website, don’t you?
Over the years, the individual blog posts turn into hundreds and then thousands of articles that are every day being pushed down further the archives of your WordPress database.
Does it then mean that the older efforts go to waste?
No, it should not. So ask yourself, how do customers or your visitors know about this problem you took time documenting a solution for in that article/picture/video/infographic – whatever content type you used – four years ago?
The more discoverable your content is, the more time visitors spend on your website, the more engagement you can expect, and the more returns on to your investment.
When you add a search bar in your WordPress website, you are enabling your visitors to dig through your rich information database for hidden gems.
If that is what you want, then this is how you can add a search bar in WordPress.
Step by Step: How to Add A Custom Search Bar in WordPress?
Step 1: Add the Default Search Bar
If you need a simple search bar to facilitate visitors finding older articles and pages, then you can use the default widget that comes with your WordPress installation.
Go to Appearance, Widgets.
Click Search, select the area you want to add the search bar to and then click Add Widget.
Your website now has a search bar, go to the site and check how it looks like. For my demo site, the search bar is added to the footer of the site.
You notice that this depends on the sidebars/areas your theme comes with.
Step 2: Add A Custom Search Bar
If you, however, need a custom search bar, then you will have to use a WordPress plugin like Ivory Search.
Ivory Search gives you more options to display the search bar on a WordPress website.
You can display the search bar anywhere on your website with a shortcode, or you can use its widget to view the search bar in the; footer, header, navigation or menu area, on not only the native pages and posts but to custom post types too.
To get started install and activate Ivory Search.
This can be done in the plugin page under Appearance, Add Plugin
Now, let’s add a search form.
Click Ivory Search from your menu. On the page that opens click Add New.
- Provide the search form name in field 1.
- Includes tab. The Search form will search for content in the configured areas.
- Excludes tab. Content chosen in this tab is not searched.
- Customize Tab.
Click Enable Search Form Customization and then Save Form.
After you have saved, click Search Form Customizer.
The Form customizer uses an interface similar to the WordPress Customizer. From here, you can change colors, the search form style, placeholder text, and the search button.
You will live preview the search bar as you make the changes.
Once you are done, click the Publish button.
To exit the customizer to the previous page, click the X button on the top left corner.
Step 3: Display the Search Form
You can copy the shortcode provided, pasting it in any area of your content. It can go to pages, posts, widgets, custom post types, literally anywhere you can stick a shortcode.
Alternatively, you can use the widgets as we did with the default search form.
For this, go to Appearance and then Widgets.
Look for Ivory Search, choose where you want to insert the search form and then click Add Widget
Provide a title for the widget and choose the search form to display from the drop-down.
Then Save your settings.
Here are the search forms displayed side by side; the one on top is what we have just customized while the second form is the default search form.
If you don’t’ like what you see, you can always go back to the plugin settings to customize the form.
I have shown you how to add a search bar in WordPress, the default form plus a customized one to match your theme or how you like it.
I believe every website should have a search form to help visitors discover content.
Not only is this helpful to visitors, but it’s also of great value to a website owner.
The more people spend time on your website, the more likely they are to consider working with you
That’s it! Hopefully you have found this read helpful. You may also want to learn how to add Google custom search to your WordPress site.