SearchWP

News

how to search by WooCommerce product attributes

Are you wondering how to search by WooCommerce product attributes?

By default, WordPress doesn’t allow your customers to do that, making it much harder to browse your store.

In this article, we’ll show you how to make your WordPress site consider product attributes when performing a search.

Why Search By WooCommerce Product Attributes

To begin with, let’s clarify what product attributes are. Product attributes are any additional information you specify about your product.

It might be its color, size, weight, price, or anything else. Making this info searchable is crucial, as it helps customers to find products they’re looking for faster.

For example, let’s say you’re the owner of an online clothing store. Typically, the names of products in a clothing store contain only its type and brand, such as Adidas Full-Zip hoodie.

But what if a customer’s looking for a hoodie in a particular color?

You could’ve specified the color in the product attributes, but WordPress doesn’t consider this data when performing a search.

specify the product's color

So, your customers have no choice but to manually browse your store to find the desired product.

It’s tedious and boring, so it’s much easier for them to leave your site and make a purchase somewhere else.

That’s why it’s so important to make the product attributes in your WooCommerce store searchable if you want to succeed online.

Additionally, customers who have had a positive user experience on your site are more likely to return once again.

Building a loyal customer base is essential, as it allows you to maintain a stable flow of orders.

Now that we know why to make WordPress consider product attributes while searching, let’s see how you can do that.

How to Make WooCommerce Product Attributes Searchable

The easiest way to make WooCommerce product attributes searchable on your site is to use a plugin like SearchWP.

SearchWP logo

This is the best WordPress search plugin that brings tons of useful features. Plus, it has seamless WooCommerce integration.

With SearchWP, you can hide or prioritize specific products in search results, add a search form to your shop page, and many more.

Over 30,000 WordPress site owners already use it to give their visitors more relevant search results.

In addition to making WordPress consider product attributes, you can also use SearchWP to:

  • Track searches on your site. Would you like to find out what customers were searching for in your store? SearchWP collects data about search activity on your site so that you can get useful information on your customers’ needs.
  • Enable fuzzy search feature. Want to improve your customers’ search experience even further? Turn on the partial match feature in SearchWP settings so that your visitors can find the right product even if they make a typo in its name.
  • Make PDF files searchable. Do you upload any PDFs to your site, such as user manuals or product installation guides? With SearchWP, you can make the text in them searchable so that your visitors can find them more easily.
  • Restrict search to products only. Want to exclude unnecessary pages such as “About us” and so on from search results on your site? With SearchWP, you can do that in a few clicks so that nothing distracts your customers from shopping.

Now let’s take a look at how you can add a search by WooCommerce product attributes to your site using SearchWP.

Step 1: Install and Activate the SearchWP Plugin

The first step is to grab your copy of the SearchWP plugin here.

Then, log into your SearchWP account and navigate to the Downloads tab.

go to the Downloads tab

Once there, click Download SearchWP to begin downloading the plugin’s ZIP file to your computer.

click Download SearchWP

After downloading, copy your license key in the same tab. You’ll need to activate the plugin further.

copy your license key

The next step is to upload the SearchWP ZIP file to your site.

Need help with that? Check out the how to install a WordPress plugin step-by-step tutorial.

Upon the plugin installation, navigate to your WordPress dashboard and click SearchWP at the top bar.

go to the SearchWP settings

Then, go over to the License tab.

go to the License tab

Paste your plugin license key into the License field and press Activate.

click Activate

After you activate your license of SearchWP, the next step is to install the WooCommerce Integration extension.

Step 2: Install and Activate the WooCommerce Integration Extension

This extension ensures the seamless integration of SearchWP with WooCommerce.

You can grab it at the WooCommerce Integration extension download page.

Once there, press the Download Extension button and save the extension’s ZIP file to your computer.

press Download Extension

When you’re finished downloading, install and activate the extension the same way as SearchWP.

Now you’re ready to start customizing your search engine to make it consider WooCommerce product attributes.

Step 3: Customize Your Search Engine

To get started, navigate to the Engines tab in the SearchWP settings.

go to the Engines tab

Here you’ll find the list of search engines created by SearchWP.

the list of your search engines

By default, there is only the Default search engine, which is associated with every existing search form on your site.

You can edit its settings to customize how the search works across your entire website.

For example, you can add new search sources, exclude certain content from search results, and more.

SearchWP allows you to create an unlimited number of search engines and link them to specific search forms. Due to this feature, you can add separate, fully customized search forms to any place on your site.

We want to allow our visitors to search for WooCommerce products by the attributes using any search form on our site. That’s why we’ll customize the Default search engine.

The first step is to add WooCommerce products as a search source. To do so, press the Sources & Settings button.

press Sources and Settings

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

tick the Products checkbox

When you’re finished, press Done to save the changes.

click Done when you're finished adding sources

The next step is to make the product attributes searchable.

To get started, press the Add/Remove Attributes button under the Products section.

press Add Remove attributes

Then, click on the Custom Fields field and choose the Any Meta Key shortcut.

choose Any Meta Key shortcut

This shortcut automatically makes all the custom fields on your site searchable so that you don’t have to enter the name of each of them manually.

Since WooCommerce stores product attributes exactly as custom fields, by adding this shortcut, we’ll make them searchable too.

When you’re finished, press Done.

click Done

Then click Save Engines to save all the changes you’ve made to the Default search engine.

press Save Engines

That’s it. Now your customers can search for products by their attributes.

The final step is to test your new search engine.

Step 4: Test Your New Search by Product Attributes

To get started, press the Visit Site button under your site’s name at the top left of your WordPress dashboard.

press Visit Site

For the purposes of this tutorial, we’ve added the Men’s Casual Pullover Hoodie product, which has the black color as an attribute.

Let’s see if we can find this product by searching for black.

click Find Results

As you can see, we found the product even though it doesn’t have the word black in its title or description.

we found the product by its attributes

It means that our test site now considers WooCommerce product attributes when performing a search.

In this article, you learned how to search by WooCommerce product attributes.

It’ll make it much easier for your customers to find the right products and boost your sales.

If you’re ready to enable search by WooCommerce product attributes on your site, you can grab your copy of SearchWP here.

Faced a problem with search in your WooCommerce store? Check out the how to fix WooCommerce product search not working detailed guide.

Want to make your WooCommerce store search even smarter? Follow the how to make a smart WooCommerce product search 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

  • “SearchWP has worked well for me. At one point, I had a problem with it, and they looked into the problem and came up with a very good fix within a few days. Great service for a great product!”

  • “Easy to setup and tweak to your needs. Hooks and filters make it easily extendable.”

  • “Faster and more easily extensible than other solutions, and much simpler and cheaper than offsite search services (Swifttype, Algolia, custom Elasticsearch engine, etc.). Phenomenal support too! Our client was very happy with the end product.”

[wpforms id="3080"]