Do you want to know how to create product search in WooCommerce?
It’ll help your visitors find the products they’re looking for faster, improve their user experience, and increase your profits.
In this guide, we’ll show you how you can create a smart product search on your site in a few simple steps, with no coding needed.
Let’s begin!
Why Create Product Search in WooCommerce?
The default WordPress search engine sees no difference between WooCommerce products and regular posts and pages.
It makes it harder for your customers to find the products they came for since they get a lot of redundant search results.
Plus, WordPress completely ignores WooCommerce product attributes when performing a search.
Due to that, your customers can’t search for products by color options, size, SKU, and more.
Thankfully, you can easily tackle both of these problems by creating a product search. It’ll help you:
- Clean up your search results. Limit search on your site to WooCommerce products so that nothing distracts your customers from shopping.
- Enable search by product attributes. Make product attributes searchable on your site to make it easier for your customers to find the products they want.
- Boost your sales. The easier it is for visitors to find the right product in your store, the more sales you’ll make.
- Build a loyal customer base. Happy customers who’ve had a positive user experience browsing your store are more likely to come again.
- Improve your site’s SEO. When visitors spend a lot of time on your site, that’s a good signal to Google that it’s worth ranking higher in search results.
After you’ve learned why WooCommerce product search is essential, let’s see how you can add it to your site.
How to Make a Smart WooCommerce Product Search
The easiest way to make a WooCommerce product search on your site is to use a plugin like SearchWP.
This is the most powerful and easy-to-use WordPress search plugin trusted by over 30,000 website owners worldwide.
SearchWP has seamless integration with WooCommerce, allowing you to fully customize WooCommerce product search to meet your needs.
For example, you can enable search by product SKUs, make product attributes searchable, add search by WooCommerce categories, and many more.
Here are some other SearchWP features that will boost your search and help grow your business:
- Exclude specific products from search. Hide redundant products from search results to clean them up and help your customers find what they’re looking for faster.
- Track searches of your customers. Find out what searches customers perform on your site to come up with new product ideas and meet their needs.
- Customize your search results page. Change the appearance of your search results page to promote your products, collect emails, or anything else.
- Add multiple search forms to your site. Place additional search forms on your site to encourage customers to use them and discover more of your products.
With that, let’s see how you can use SearchWP to enhance WooCommerce product search on your site.
Step 1: Install and Activate SearchWP
To get started, you can go and grab your copy of SearchWP here.
Once done, log in to your SearchWP account and navigate to the Downloads tab.
Next, press the Download SearchWP button to start downloading the plugin’s ZIP file to your computer.
After downloading, copy the license key in the bottom left corner on the same page.
The next step is to upload the ZIP file you downloaded to your site and install SearchWP.
If you need help with that, you can check out this detailed step-by-step tutorial on how to install a WordPress plugin.
After installing the plugin, you’ll need to activate it with the license key you copied in the previous steps.
To get started, navigate to your WordPress dashboard and hover your mouse over the SearchWP button at the top bar.
Then, click the Activate License option from the drop-down menu.
Once you get to the license page, paste your license key into the License field and click Activate to activate your SearchWP license.
After installing and activating SearchWP on your site, the next step is to install the WooCommerce integration extension.
Step 2: Install the SearchWP WooCommerce Integration Extension
This extension ensures seamless integration of SearchWP and WooCommerce plugins, allowing you to make product searches much smarter.
To install it, navigate to SearchWP » Extensions in the left panel of your WordPress dashboard.
Then, find the WooCommerce Integration extension and click Install under its section.
After installing and activating the extension, you’re ready to start setting up your search engine.
Step 3: Set Up Your Custom Search Engine
To get started, click SearchWP in the left panel of your WordPress dashboard.
After that, you’ll get to the Engines tab. On this tab, you can manage search engines created with SearchWP and add new ones.
A search engine includes a set of rules and conditions that WordPress relies on when performing a search.
With SearchWP, you can completely customize them to meet your needs and change the way search works on your site.
For example, you can manage search sources, exclude specific pages or categories from search, adjust attribute relevance weights, and much more.
The best part is that SearchWP allows you to add multiple search engines and link them to individual search forms throughout your site.
This way, you can create fully customized search forms with a unique set of rules and conditions.
Right now, there is only the Default search engine, which SearchWP automatically creates after installation.
It’s linked to every existing search form on your site, so by customizing this search engine, you can control how search works across your entire site.
Limit Search to WooCommerce Products
As you can see, the Default search engine currently has 3 search sources: Posts, Pages, and Media.
To create a smart product search, we first need to add WooCommerce products to this list as a search source.
To get started, click the Sources & Settings button.
Then, tick the checkbox next to the Products source to make it active.
Let’s also remove any other search sources except Products so that our customers can only see our products among search results.
To do that, uncheck all search sources and leave only Products active.
When you’re finished customizing your search sources, press Done to save the changes.
Adjust the Product Attributes Relevance Weight
As you can see, each search source has a list of attributes.
Attributes are the parts of a page or product that WordPress considers when performing searches.
The higher the relevance weight of an attribute, the more priority WordPress will give to it.
You can adjust the relevance weight by moving the slider next to an attribute left or right.
For example, let’s give the Title attribute the highest priority so visitors can more easily find products by their titles.
To do that, move the slider next to all attributes except Title all the way to the left.
Make New Product Attributes Searchable
You can also completely remove attributes from a search source or add new ones. To get started, press the Add/Remove Attributes button.
If you want to remove any default attributes, uncheck the boxes next to them on the left side.
To add new attributes, click on the Custom Fields or Taxonomies field, depending on what you want to add.
Then, start typing the name of an attribute you want to make searchable until the drop-down menu of available attributes pops up.
Click on the appeared option with the “_” prefix. For example, in our case, it’s _sku, as we want to make product SKUs searchable on our site.
There is also a way to quickly make WordPress consider all existing product attributes at once, such as color, price, size, and so on.
To do that, click on the Custom Fields field once again and choose the Any Meta Key shortcut.
This way, you don’t have to manually enter the name of each attribute you want to make searchable. It’s convenient and saves time if you want to add plenty of product attributes.
Let Your Customers Search by Product Tags
Let’s also allow our customers to search by product tags. First, click on the Taxonomies field.
Then, find the Product tags option and click on it to add tags as an attribute to the Default search engine.
When you’ve finished managing your search engine attributes, click Done to save the changes you’ve made.
Now let’s say we also want to exclude some WooCommerce product search categories from search on our site.
Manage WooCommerce Categories You Want to Appear in Search
To get started, press the Edit Rules button.
Next, click Add Rule.
Then, click on the Only show entries if: menu and change it to Exclude entries if:.
Once you’ve done that, click on the Product type menu.
Then, choose the Product categories option.
Next, enter the name of the category you want to exclude from the search in the rightmost field.
For example, let’s say we want to exclude the Jeans category that we have on our test site from the search.
When you’re satisfied with excluded categories, press Done.
Save Your Customized Search Engine
The final step is to save all changes you made to your search engine. To do that, press the Save Engines button in the upper right corner.
Then, click the Rebuild Index button next to it to make WordPress reindex all your pages and products considering your customizations.
That’s it. Now you have a smart WooCommerce product search on your site.
Let’s test it out and see how it works.
Step 4: Test Your New Product Search
To do that, you’ll need to leave your WordPress dashboard and go over to your site. The fastest way to do that is to press the Visit Site button under your site’s name in the upper left corner.
There are several posts on our test site about how to choose a nice beanie for each season.
Let’s try to search for “beanie” and see what results we get.
As you can see, there are only products among search results even though we have a few articles on the same topic.
It means that the rule we added to our search engine works, and WordPress performs searches only among products.
Let’s also check if we can find a product by the tag. We have a product on our test site called Warm Jacket.
It doesn’t have any description, hasn’t been added to any category, but has the Winter Clothes tag.
Let’s see if we can find this product by its tag alone.
As you can see, we successfully found the product.
It means that WordPress now considers product tags when performing a search.
How to Create a Search Page in WooCommerce
Using SearchWP, you can add a search form to a separate page to give your visitors a more convenient way to search for products.
Let’s see how you can do that step-by-step.
Step 1: Install and Activate SearchWP
The first step is to grab your copy of SearchWP and install it on your site.
We’ve already covered how you can do that earlier in this article, so feel free to check out how to install and activate SearchWP.
Step 2: Create a Search Page
After installing SearchWP on your site, you’re ready to create your search page.
A separate search page helps you narrow your search results, promote your products, collect emails, and more.
Here is an example of how it looks on our test site:
For more information, check out our step-by-step guide on how to create a search page in WordPress.
In this guide, you learned how to create a product search in WooCommerce in a few simple steps.
It’ll help your visitors find the right products, improve their user experience and boost your sales.
If you’re ready to enhance search on your site and grow your business, you can get started with SearchWP here.
Faced any problems with WooCommerce search on your site? Check out our detailed guide on how to fix WooCommerce product search not working.
Looking for a way to add a search form to your WooCommerce shop page? Follow our how to add a WooCommerce search form to your shop page step-by-step tutorial.