Adding filtered navigation with the Layered Nav widget
When you have thousands, hundreds, or even dozens of products, it becomes very important to give your customers enhanced search functionality to find the product they want. One of the ways of doing that is to give them a way to filter search results. WooCommerce has filtering logic built right into it with the Layered Nav widget.
Getting ready
You'll need to have a few products on your site and at least some of those products will need to have global attributes set as per the Adding global product attributes recipe in Chapter 2, Adding Products.
How to do it…
If your products already have attributes set, then giving your customer the ability to filter the shop page or search page is very easy. You only need to add the Layered Navigation widget to the page.
Go to Appearance | Widgets.
Under Available Widgets, click on WooCommerce Layered Nav and then add it to the appropriate sidebar.
Note
WordPress themes can have multiple sidebars, and they...