Do you want to make a search bar that searches your site in WordPress?
A search bar is very important for your website. A powerful search bar helps your site users find all the posts, pages, and products they need quickly. If you put your search bar in the right place, visitors will spend more time on your site. You also get to sell more too.
In this article, we’ll show you how to make a search bar that searches everything on your WordPress site.
You’ll also learn how to add it to specific locations on your site. The best part is that you don’t need to write a single line of code to do these.
Why Make a Search Bar that Searches Your Website?
If you want to offer your site visitors the best user experience, you need to pay attention to your site search. Users need the search feature to find what they’re looking for on your website.
This is even more important if you have a large website with lots of content. Adding a powerful search bar that searches your site will save your visitors a lot of time.
Poor site navigation is one of the major reasons why people leave websites.
Is your site experiencing a high bounce rate? It may be because your site visitors need to search through many pages and posts just to find what they’re looking for. Adding a search bar that searches everything on your site can help you reduce your bounce rate.
But adding just any search bar is not enough. You also want to make sure that your site’s search shows your visitors all the content you have to offer.
By default, WordPress ships with a search feature. But this feature lacks power and doesn’t always give the user the results they need.
The good news is that you can improve your site search using a WordPress plugin. With the right plugin, your users can find all the posts, pages, files, and products they need.
Adding the search bar to the right place helps your users navigate your site better.
You can add the search bar to your sidebar, header, footer, or even within a WordPress page. The options available will depend on the WordPress theme you’re using.
Ready to make a search bar that searches your site? We’ll show you how to do it the easy way.
How to Make a Search Bar That Searches Your Site
To make a search bar that searches everything on your website, you can start by getting a plugin like SearchWP. Even if you’re not tech-savvy, this tool can help you improve your site’s search capabilities with just a few clicks.
As the best WordPress search plugin, your site visitors will enjoy the tons of features it offers. They’ll now be able to find relevant results in seconds each time they use the search bar.
Over 30,000 website owners already use the plugin to improve their site search. It gives you full control over how you want your site to look for search results.
Here are some of the powerful features you get using SearchWP:
- Search your entire site. SearchWP indexes everything on your website. When your users type in the search bar, your site will look for results in product details, database table content, and even custom fields.
- Multiple search engines. You can use multiple search engines to create unique search experiences across your website pages. Configure each engine to meet your users’ needs at different points of their journey on your site.
- Text document indexing. Do you have PDF and office documents on your website? You customers can now find them by searching for keywords they contain.
You probably already feel limited by the default WordPress search features. Or your native search bar doesn’t display relevant results.
SearchWP will help you transform your site search and give your users the best experience possible. You can even use the plugin to add live autocomplete search to WordPress.
SearchWP is so easy to use and you don’t need any technical expertise to use all these powerful features. You can easily use the tool to make a search bar that searches your site in 3 steps.
Step 1: Install and Activate SearchWP
To get started, first get your own copy of the SearchWP plugin here.
Once you’ve grabbed your copy of SearchWP, you’ll get access to download 2 versions of the plugin.
Click any of the links to download the version you want. For the best performance, we recommend the latest version.
After grabbing your copy of the tool, SearchWP will also send you an email that contains your product license key. Save this key somewhere you can find it when it’s time to activate the plugin within your WordPress dashboard.
The next thing is to log into your WordPress dashboard and upload the plugin.
You can follow this guide on how to install a WordPress plugin to do that.
Once you’ve installed and activated SearchWP, the next step is to activate the product license.
While activating SearchWP, it added a new SearchWP navigation button to the upper panel of your dashboard. Click this button to go to the settings page.
On the settings page, navigate to the License tab and fill in the license key from the email you received earlier. Now click Activate.
After activating your license, your SearchWP plugin is now all set up and ready for use. Now, it’s time to set up your first search engine.
Step 2: Set Up Your Search Engine
Now that you’ve activated SearchWP, let’s decide how it’ll look for search results. The plugin offers tons of options for customizing your site’s search.
To configure these options, go to the settings page by clicking SearchWP in the top corner of your dashboard.
Here, you can choose to either edit the default search engine or add a new one. Adding a new site-wide search engine is like making your own Google search algorithm for your website.
SearchWP allows you to add multiple search engines to 1 website. This way, you can offer unique search experiences in different locations of your site.
If you want to create a new engine, simply click Add New.
Next, it’s time to select where you want SearchWP to look when searching for results. To do this, click Sources & Settings.
You can choose to search within sources like posts, pages, media files, and products. You can also decide to support keyword stemming (search for similar keywords) or enable admin search. Select as many options as you like in the popup and click Done afterward.
By default, SearchWP will look at the post title, content, slug, and excerpt for matches. If you want, you can adjust these by clicking on the Add/Remove Attributes button.
Here, you can configure which attributes you want to restrict search from this source to. You can choose from attributes like title, slug, content, or short description. You can also include the custom fields and taxonomies like the product variations, post categories, etc.
For example, you can choose to index product attributes like color, model, tags, and shipping class.
This way, a user can easily find all products in a particular shipping class by searching for the shipping class.
Click Done after choosing all your preferred attributes.
Also, you can add specific rules to further customize the search experience. To do this, click Edit Rules.
For example, you can choose to exclude or search for only pages published after a certain date. Once you’re done, click Add Rule then Done.
Next, you can also adjust how your site’s search engine values and ranks content when looking for results. For example, if you want to rank the post title higher than the content, then you can adjust the slider to give more weight to it here.
After setting up your sources, adding attributes, and adjusting their relevance, click Save Engines. SearchWP will then apply your new settings and build your search index again.
The last step in this process is to display a search bar on your site.
Step 3: Display the Search Bar on Your Site
You can add a new search bar as a widget and place it anywhere on your website.
The widgets available on your site depends on the WordPress theme you’re using. Some themes automatically add a search bar to your site’s header or sidebar. If your theme doesn’t have one, you can still add it yourself.
For this tutorial, we’ll add the search bar to the sidebar. This location makes it easy to search your site no matter the page the user is on.
To add a new widget, navigate to Appearance » Widgets.
On the next page, choose where you want to add your widget and click the + icon.
Then type in search and select the Search icon from the list.
Finally, click Update in the top right corner.
Congratulations! You’ve just made a search bar that searches your site.
Now, when site users visit your pages and posts, they’ll see a search bar that searches everything on your website.
In this article, you’ve learned how to make a search bar that searches your site in WordPress.
You can use this feature to improve your site’s user experience and help your customers find the content they need faster.
Are you ready to make a search bar that searches your site? Get started with SearchWP now!
You can also check out our articles on how to add a WooCommerce search form to your shop page or how to restrict WooCommerce product search to title only.