Skip to content

How to Search WooCommerce Products by Tag in WordPress?

Key Takeaways

  • Nexter Blocks Search Bar block lets a WooCommerce store search products by Product tags after the Source is set to Taxonomy and the Select Taxonomy dropdown is set to Product tags.
  • Nexter Blocks requires installation and activation before the Search Bar block works, and the store already has products added to the WooCommerce store.
  • AJAX Search, All Result, and Show Count are available in the Search Bar block, with Label and Placeholder fields for the select dropdown.
Table of Contents

Product tags cut across categories. A bestseller tag or a gift-ready tag describes products from every part of the catalogue at once, which is exactly what a shopper browsing for an occasion wants.

The Search Bar can put those tags in a dropdown beside the input.

For every Search Bar setting in one place, see the Search Bar guide.

Before You Start

  • Edition: Free. Measured with Nexter Blocks Pro deactivated, the Search Bar renders identically — form, input, dropdowns, suggestions and results all work without Pro.
  • Block to enable: Search Bar, switched on under Nexter > Blocks in your WordPress dashboard.
  • WooCommerce active, with published products. Product search is guarded: with WooCommerce inactive the block returns an error rather than an empty list.
  • Products with product tags applied. The dropdown is built from those terms.

Steps

  1. Select your Search Bar block and add a filter field with taxonomy as its source.
Adding a taxonomy filter field
  1. Choose Product Tag as the taxonomy, then publish.
Choosing the product tag taxonomy

How It Behaves

  • The dropdown lists your live product tags. Measured on a store with six tags, the dropdown rendered 7 options including the All entry.
  • Choosing a tag filters the query exactly. Measured against a seeded catalogue, a tag returned precisely the products carrying it.
  • The product post type is derived from the taxonomy, so no separate post type setting is needed.
  • Tags render flat, because product tags have no hierarchy.
  • Hidden products stay hidden, and prices render once the price toggle is on.

Limitations

  • Tags with no products still appear in the dropdown and return nothing.
  • A heavily tagged catalogue makes an unusable dropdown. If you have more than a couple of dozen tags, a category filter is the better choice.
  • One tag at a time. A shopper cannot combine bestseller and gift-ready.
  • The tag narrows, it does not search. The typed term still has to match an enabled field.

Troubleshooting

The tag dropdown is empty

No product tags exist, or the taxonomy was not selected on the filter field.

A tagged product is not returned

The typed term still has to match. By default only the product title is searched, so try enabling content matching.

I want a category filter as well

Add a second filter field set to product category. Each filter field renders its own dropdown.

Related Docs

Share your Thoughts

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!