GET FREE VERSION GET THE PRO VERSION

How to Display Product Category Results in the WooCommerce Search Results Page

Overview

In this article, we’ll explore how to enhance your WooCommerce store’s search functionality by including product categories in search results. By default, WooCommerce doesn't display product categories when users perform a search, which can limit the effectiveness of the results. We’ll explain why showing WooCommerce product categories is beneficial and walk through several methods to achieve this—especially using the Advanced Woo Search plugin.

Why Display Product Categories in WooCommerce Search Results?

By default, WooCommerce search only returns individual products, not their categories. However, including product categories in search results can significantly improve the shopping experience. For example, if a customer searches for "t-shirt" and sees a category like "Men's T-Shirts" or "Women's T-Shirts," they are more likely to find what they're looking for.

It’s important to note that we’re not referring to a generic list of WooCommerce categories, but rather categories that are directly relevant to the search query. Unfortunately, WooCommerce does not support this out of the box.

Taxonomy term results on the search results page

Taxonomy term results on the search results page

Ways to Display Product Categories in Search Results

There are limited native options to show WooCommerce categories on the search results page. One of the simplest and most effective solutions—especially for non-developers—is the Advanced Woo Search plugin.

This powerful plugin enhances WooCommerce search with live Ajax support, dedicated results pages, and intelligent search algorithms.

Key features include:

  • Search by product title, content, SKUs, taxonomies, attributes, custom fields, and more.
  • Include product categories, tags, attributes, and custom taxonomies in search results.
  • Search result filters.
  • Synonym support.
  • Misspelling detection and search suggestions.

How to Display Product Categories with Advanced Woo Search

The Advanced Woo Search plugin includes WooCommerce product categories in its live Ajax search results by default. However, displaying them on the full search results page requires a bit more setup.

Taxonomy terms results in live search

Taxonomy terms results in live search

The plugin uses your theme’s search template to inject its results, offering great flexibility and compatibility. But this also means that showing product categories on the full search page might need additional configuration.

Ultimately, we want to display product category results not only in live search but also on the full search results page.

Taxonomy terms results on search results page

Taxonomy terms results on search results page

Here are three methods to do this:

Solution 1: Using Elementor Page Builder

This method is ideal if you're using the Elementor page builder.

Elementor allows full customization of the WooCommerce search results page. We'll use this to add a new widget that displays product categories.

Advanced Woo Search offers deep integration with Elementor. More details can be found here.

Steps to add product categories with Elementor:

  1. Go to Elementor → Templates → Theme Builder.
  2. Find the Product Archive template and click "Edit." If you don’t have one, follow this guide to create it.
  3. Elementor page template for product archives

    Elementor page template for product archives

  4. In the editor, find the Taxonomies Results widget under the Advanced Woo Search category and place it above the product results.
  5. Taxonomies Results element

    Taxonomies Results element

  6. Open the widget settings and set the Taxonomy to "Category". Adjust Results Count and Columns as needed.
  7. Taxonomies Results block settings

    Taxonomies Results block settings

  8. Save your changes. Product categories should now appear above the product search results.

Solution 2: Using Gutenberg (Block Editor)

This solution is for users of the WordPress Block Editor (Gutenberg) and a block-based theme.

Learn more about the plugin’s Gutenberg integration here.

Not sure if your theme is block-based? Go to Appearance → Editor. If you see a list of templates, then your theme supports it.

Steps to display product categories using the Block Editor:

  1. Navigate to Appearance → Editor and open the Product Search Results template.
  2. Template for WooCommerce product search results

    Template for WooCommerce product search results

  3. Add the Taxonomies Results block (found under Advanced Woo Search) above the products block.
  4. Taxonomies Results block

    Taxonomies Results block

  5. Set the Taxonomy to "Category". Adjust other settings like Results Count and Columns as needed.
  6. Taxonomies Results block settings

    Taxonomies Results block settings

  7. Save your changes. Product categories should now appear above product results on the search page.

Solution 3: Universal Method Using a Shortcode

For full control and compatibility, you can use a shortcode that fetches relevant WooCommerce categories and displays them wherever you want—page templates, PHP files, widgets, etc.

Here’s the shortcode:

[aws_taxonomy_terms_results taxonomy="product_cat" limit="-1" columns="4"]

This method is universal and doesn’t rely on any specific page builder.

Note: This shortcode must be placed on the WooCommerce search results page. It won’t return results on other pages.

Where should you place the shortcode? That depends on your theme:

  • If your theme has a widget area for search results, just add a Text widget with the shortcode.
  • Shortcode inside the text widget

    Shortcode inside the text widget

  • If you're editing PHP files directly, insert this snippet:
<?php echo do_shortcode('[aws_taxonomy_terms_results taxonomy="product_cat" limit="-1" columns="4"]'); ?>

Some themes allow direct customization of the search results page template—add the shortcode directly in the content area.

Shortcode for product categories results inside page template

Shortcode for product categories results inside page template

The possibilities are endless. Choose the method that best fits your site’s structure and your preferences.

Conclusion

Displaying product categories in WooCommerce search results can dramatically improve usability and help customers navigate your store more efficiently. With the Advanced Woo Search plugin, you can do this with ease.

Here’s a quick comparison of the available methods:

MethodDifficultyFlexibilityRequires Search PluginPage Builder Required
Elementor Page BuilderEasyMediumYesYes (Elementor)
Gutenberg Block EditorEasyMediumYesYes (Gutenberg)
Code Snippet (Universal)MediumHighYesNo

Choose the method that best fits your workflow and technical expertise. Whichever approach you take, enabling WooCommerce category search will boost your store’s performance and user satisfaction.

Comments

Download free version

Download free version from wordpress.org repository.

Purchase pro version

Read about differences between free and pro versions here.