Remember the last time you couldn’t find something on an online store, even though you knew it was there? That’s exactly what your customers experience with WooCommerce’s default search.
Many store owners think that the basic WooCommerce search is enough for their online store. However, it has limited search capabilities.
That’s why customizing product search is important if you want to increase your sales and grow your business.
In this article, we’ll show you the easiest and fastest way to customize your WooCommerce product search.
Why Customize WooCommerce Product Search on Your Site
You might want to customize WooCommerce product search on your site due to a couple of reasons.
First, it helps you give your customers more accurate and comprehensive search results.
The thing is, the native WordPress search engine completely ignores WooCommerce product attributes, tags, reviews, and other details.
It happens because WooCommerce stores all additional product data as custom fields. By default, WordPress only includes title, content, and excerpt of posts and pages.
This means it doesn’t consider any content within custom fields while performing a search. As a result, customers can only find products by titles and descriptions, making it harder to find what they’re looking for.
If customers can’t find the product they came for in your store, they’ll simply leave and are unlikely to come back again. That’s why it’s important to customize your product search and make custom fields searchable.
Besides that, you can create search fields limited to specific categories or tags. It can help you further narrow the search and provide your audience with more relevant search results.
Now, let’s look at how you can customize WooCommerce product search on your WordPress site.
Customize Your WooCommerce Product Search
The easiest and fastest way to customize your WooCommerce product search is to use a plugin like SearchWP.
This is the most powerful WordPress search plugin, which allows you to fully customize how search works on your site.
For example, using it, you can make searchable WooCommerce product attributes, exclude or prioritize specific products in search results and many more.
Also, using SearchWP, you can add and use multiple search engines with different rules. This feature allows you to create search boxes limited to specific categories and product types.
More than 50,000 online store owners already use it to boost their sales by providing customers with more relevant search results.
Here are other things you can do with SearchWP:
- Keyword Tracking: Do you want to know what customers were searching for in your store? SearchWP gathers all on-site search activity, providing precious insights into customers’ needs.
- Fuzzy Search: Would you like WordPress to recognize that the words ‘ball’ and ‘basketball’ refer to the same product? It’s possible with the SearchWP fuzzy search feature, also known as partial matching.
- Live Search Results: Want to display search results on your online site in live mode? Using SearchWP, you can turn this feature on, helping your customers to find products faster.
- Searchable PDFs: Do you upload any PDF files with price lists, tutorials, or anything else to your store? With SearchWP, you can make the content within them searchable.
That said, let’s see how you can customize your WooCommerce product search using SearchWP.
Step 1: Install and Activate SearchWP
The first step is to grab your copy of the SearchWP plugin by visiting the website and signing up for a new account.
After that, you can go to your SearchWP account and navigate to the Downloads tab. Once there, press the Download SearchWP button to start downloading the plugin ZIP file to your computer.
You can also copy the license key on the same tab, as you’ll need it to activate the plugin on your site after the installation.
After the download is complete, upload the SearchWP plugin ZIP file to your WordPress site.
Need any help with that? Check out the how to install a WordPress plugin step-by-step tutorial.
Upon activation, you’ll see the welcome screen along with the setup wizard. Go ahead and click the ‘Start Onboarding Wizard’ button and follow the onscreen instructions.
That’s it. You successfully activated your copy of SearchWP.
Step 2: Install and Activate the WooCommerce Integration Extension
The next step is to install the WooCommerce Extension. This extension ensures the seamless integration of SearchWP with WooCommerce.
Next, you will need to go to SearchWP » Extensions from the WordPress dashboard and navigate to WooCommerce Integration. From here, simply click the Install button.
Step 3: Customize a Search Engine
Once you’ve installed WooCommerce Integration extension, the next step is to customize the WordPress search engine.
You can think of a search engine as a list of rules that SearchWP follows when performing a search. By changing the settings of a search engine, you can customize the way it works.
For example, you can specify which search sources it should look for, what post or page attributes to consider, and many more.
For this tutorial, we will edit the Default search engine, which is used for native WordPress searches. It means that by customizing it, you can change how the search works across the entire site.
First, head to the SearchWP » Algorithm page from your WordPress dashboard and click the ‘Sources & Settings’ button.
Here, you can change which sources SearchWP will include in the search process.
To make it consider WooCommerce products, simply check the box next to the Products source.
After you finish selecting the necessary sources, click Done to save the changes.
Next, you can make WordPress consider custom fields, taxonomies, and other details. To do that, scroll down to Products source and press the Add/Remove Attributes button.
Here, you can specify which custom fields and taxonomies you want the search engine to consider while performing a search.
The default search engine will already include title, content, slug, excerpt, and author as attributes.
However, you can click the Custom Fields and Taxonomies dropdown menu to select the attribute you’d like to include in WooCommerce search.
For example, we’ll add the product categories as an attribute to include in WooCommerce search.
When you’re finished managing attributes and taxonomies, click Done to save the changes.
As you can see, the Product categories taxonomy now appears among the list of attributes of the Products source.
You can also adjust the relevance weight of the attributes by moving the slider next to each one to the left or right. The greater the weight, the more attention SearchWP will pay to the attribute when searching. Now, let’s take a look at how you can hide products from appearing in search results.
SearchWP also lets you automatically exclude products from search results if they fall under certain conditions.
To get started, simply press the Edit Rules button.
At first, there are no rules here.
To add a new one, click Add Rule.
Here, you can specify under what conditions products should be shown or excluded from search results.
For example, you can add a rule to limit search to certain categories or exclude out-of-stock products from search results.
Let’s say we want to exclude products that are not categorized. To do so, we’ll select the Product categories taxonomy from the drop-down menu and select Uncategorized in the field next to it.
When you’re finished adding rules, click Done.
After that, you can scroll to the top and click the Save button at the top right to apply all the changes you’ve made.
That’s it. Now you have a fully customized search engine.
The next step is to try how the customized search works on your site.
Step 4: Test Your New Search
To test your customized WooCommerce product search, simply visit your site.
From here, you can head to the search bar on your site. For example, we’ve added a product titled Green beanie and placed it into the Hats category.
If we can find this product by searching for “hat”, it means that search on our test WordPress site now considers product categories.
As you can see, we successfully found the Green beanie product, even though it doesn’t contain the word “hat” in the title or description.
Bonus: How to Fix WooCommerce Search Not Working
Now that you know how to customize WooCommerce product search, you should also know that at times it might not work properly.
There can be several technical factors that can prevent the basic search from working correctly. Common culprits include caching issues that serve outdated or incorrect results. Conflicts with your active theme or other installed plugins are also frequent causes, as they can interfere with WooCommerce’s search process.
Lastly, incorrect settings within WooCommerce or your theme might also hide products from search results or misconfigure the search behavior.
Initial troubleshooting steps like clearing caches, temporarily deactivating plugins/switching themes to check for conflicts, and ensuring products are correctly published and visible can fix issues preventing the default search from functioning.
On the other hand, if customers are searching by SKU, attribute, or other details not in the title or main content, the default search will simply return no results. This is where you can use a search plugin like SearchWP to improve WooCommerce product search.
To learn more, please follow our detailed guide on how to fix WooCommerce product search not working.
We hope this article helped you learn how to customize your WooCommerce product search. You may also want to see our guides on how to search in category in WooCommerce and how to add custom WooCommerce search widgets.
Ready to create a better and more personalized WordPress search experience? Get started with SearchWP today!