GET FREE VERSION GET THE PRO VERSION

Unable to Search by Product Attributes

In this article we cover an issue with not working WooCommerce products search based on attributes values.

In this article

Overview

In this article we cover an issue with not working WooCommerce product search based on attribute values.

With Advanced Woo Search PRO, it is possible to search for products via their variations' values.

Search for products via variations

Search for products via variations

But sometimes, you might face an issue where search based on product attributes doesn't work. There are several reasons for this, and below we’ll cover the most common ones.

1. Check Search Index

First of all, check your plugin index-related options.

  1. Go to Adv. Woo Search → Performance tab and check the 'Data to index' option. Make sure that the Attributes field is enabled.

    Field to enable attributes index

    Field to enable attributes index

  2. Click on the gear icon next to it and ensure that all specific attributes you want to search for are enabled.

    Attributes to index

    Attributes to index

  3. Finally, go to the main settings page and click the Reindex Table button. Wait until the reindex process is completed.

    Reindex Table button

    Reindex Table button

2. Check Search Settings

If the issue persists, follow these steps to verify your search settings:

  1. Go to Adv. Woo Search → Search Results tab and locate the 'Search in' option. Make sure the Attributes field is enabled.

    Field to enable attributes search

    Field to enable attributes search

  2. Click the gear icon next to it and check that all the required attributes you want to search for are enabled.

    Via what attributes you want to search

    Via what attributes you want to search

  3. Scroll down to the Filter Results section and make sure there are no search result filters based on product attributes that might be hiding the expected results.

    Search results filters options

    Search results filters options

3. Don’t Mix It Up with Custom Attributes

Lastly, check your product attributes themselves.

WooCommerce has two main types of product attributes - standard attributes, which are visible inside the Products → Attributes page, and custom attributes.

Steps 1 and 2 above were related to standard attributes.

But what about custom attributes? These are special attributes you can add to any product without creating a global version. They are similar to custom fields but used as attributes.

Custom attributes for product

Custom attributes for product

It’s easy to confuse custom attributes with standard ones, so if the previous steps haven’t helped, you might be using custom attributes instead.

In this case, you can also enable search for products via custom attributes.

  1. Go to Adv. Woo Search → Performance tab and check the 'Data to index' option. Make sure the Attributes field is enabled.

    Field to enable attributes index

    Field to enable attributes index

  2. Click on the gear icon next to it, and on the next page, enable the Custom product attributes field.

    Field to enable custom product attributes index

    Field to enable custom product attributes index

  3. Go to the main settings page and click the Reindex Table button. Wait until reindexing is complete.

    Reindex Table button

    Reindex Table button

  4. Go to Adv. Woo Search → Search Results tab and locate the 'Search in' option. Ensure the Attributes field is enabled.
  5. Click the gear icon next to it and enable the Custom product attributes field.

    Field to enable custom product attributes search

    Field to enable custom product attributes search

FAQ

What is the difference between standard and custom attributes?

Standard attributes are created globally under Products → Attributes, while custom attributes are added directly to individual products and are not globally defined.

Is it possible to create search filters based on product attributes?

Yes, you can create search result filters based on different parameters, including filters based on product attributes. More details - Filters For Search Results.

Do I need to reindex the plugin table after every product data change?

No. You need to reindex the plugin table only after the first plugin activation or after changing any options inside the Performance settings page. In other cases, you don’t need to manually reindex the plugin table - all product changes are synchronized automatically.

Can I search and display product attributes?

Yes, it is possible. More details can be found in this article: Attributes terms search.