WooCommerce: Show Category For Each Product @ Shop Page

A client of mine has a category called “Brand”. Each product is assigned to a specific Brand subcategory e.g. Nike, Adidas, etc. The goal of this task was to show the “Brand” subcategories in the shop/category/loop pages as a way to help the user identify the brand name.

The same can be applied to showing ALL categories, so the user knows exactly to what section of the shop the product belong to. Great, let’s see how it’s done!

Continue reading WooCommerce: Show Category For Each Product @ Shop Page

WooCommerce: Hide Categories From Product Cat Widget

A client asked me to customize the Product Categories Widget that comes included with WooCommerce. In this case, they wanted to show ALL categories but the current one (when looking at a category page of course).

You can also use this tutorial to hide certain category IDs from the widget, or maybe “all product category names that start with a given string of text”. Case studies are millions, but the code base is always the same – we’ll make use of the “woocommerce_product_categories_widget_args” filter and provide a list of product categories to exclude. Enjoy!

Continue reading WooCommerce: Hide Categories From Product Cat Widget