SearchWP

News

How to Create Product Search in WooCommerce (Step by Step)

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.

SearchWP logo

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.

click Downloads

Next, press the Download SearchWP button to start downloading the plugin’s ZIP file to your computer.

press Download SearchWP

After downloading, copy the license key in the bottom left corner on the same page.

copy your license key

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.

click SearchWP at the top bar

Then, click the Activate License option from the drop-down menu.

click Activate License

Once you get to the license page, paste your license key into the License field and click Activate to activate your SearchWP license.

click Activate

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.

navigate to Extensions

Then, find the WooCommerce Integration extension and click Install under its section.

install the WooCommerce extension

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.

click SearchWP

After that, you’ll get to the Engines tab. On this tab, you can manage search engines created with SearchWP and add new ones.

your search engines

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.

the list of your search engines

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.

click Sources & Settings

Then, tick the checkbox next to the Products source to make it active.

check the Products search source

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.

uncheck search sources

When you’re finished customizing your search sources, press Done to save the changes.

click Done when you're finished managing sources

Adjust the Product Attributes Relevance Weight

As you can see, each search source has a list of attributes.

attributes of a search source

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.

you can adjust the attributes relevance weight

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.

press Add Remove attributes

If you want to remove any default attributes, uncheck the boxes next to them on the left side.

remove search sources

To add new attributes, click on the Custom Fields or Taxonomies field, depending on what you want to add.

remove search sources

Then, start typing the name of an attribute you want to make searchable until the drop-down menu of available attributes pops up.

find an attribute

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.

choose the SKU attribute

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.

click Any Meta Key

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.

click Taxonomies

Then, find the Product tags option and click on it to add tags as an attribute to the Default search engine.

choose the products tag attribute

When you’ve finished managing your search engine attributes, click Done to save the changes you’ve made.

press Done when you're finished

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.

click Edit Rules

Next, click Add Rule.

click Add Rule

Then, click on the Only show entries if: menu and change it to Exclude entries if:.

choose Exclude entries if

Once you’ve done that, click on the Product type menu.

click on the product type field

Then, choose the Product categories option.

select product categories

Next, enter the name of the category you want to exclude from the search in the rightmost field.

type the name of category you want to exclude

For example, let’s say we want to exclude the Jeans category that we have on our test site from the search.

we excluded a category

When you’re satisfied with excluded categories, press Done.

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.

click Save Engines

Then, click the Rebuild Index button next to it to make WordPress reindex all your pages and products considering your customizations.

click Rebuild Index

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.

click Visit Site

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.

we search for beanie

As you can see, there are only products among search results even though we have a few articles on the same topic.

how to create product search in WooCommerce

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.

click Find Results

As you can see, we successfully found the product.

we found our 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:

search page with products

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.

Want to make your search awesome right now?

More than 30,000 sites have chosen SearchWP!

You can utilize all of the content that’s gone unrecognized by native WordPress keyword search instantly with SearchWP.

Get SearchWP for just $99

  • Committed Support
    If you need help, support is fast, friendly, and here for you
  • Streamlined Setup
    Installation and setup that’s optimized for speed
  • Great Documentation
    Helpful, clear, and usable documentation is a priority

See what SearchWP customers have to say

  • “We’ve been using SearchWP on our Knowledge Base for the past few months, and it has made a significant difference for our clients. It’s helped reduce the number of support tickets because people can find what they’re looking for, and we also love the metrics and seeing trends in searches. If you want people to find things on your site, it’s the best and I highly recommend SearchWP!”

  • “My company is using Wordpress internally as Knowledge base system. We choose to not use menu and base everything on the search engine like Google does. SearchWP is an extremely efficient tool to find what we need quickly. I would recommend it.”

  • “Jonathan went above and beyond to help resolve a support issue on my site. I love SearchWP anyway, it’s the go-to search plugin recommended to all of our clients, but the support offered in this instance was exceptional and very much appreciated.”