Eren Labs JOURNAL TR
Product Catalog

WooCommerce: Show Categories on the Shop Page (and Hide the Ones You Don’t Want)

WooCommerce can open the shop page with category tiles instead of, or above, the products. Where the setting is, the rules that decide which tiles appear and when they don't, how to order them, and how to hide a category's tile or its products.

In this article10 sections

To show categories on the WooCommerce shop page, go to Appearance → Customize → WooCommerce → Product Catalog and set Shop page display to “Show categories” or “Show categories & products”. Publish, and the shop page opens with a tile for each top-level product category. That works in classic themes. This guide also covers what to do in a block theme, the rules that quietly switch the tiles off, how to put them in the order you want, and how to hide one category, either its tile or its products, from the shop page. All of it was checked against WooCommerce’s code, version 11.3.1.

The three shop page layouts#

Illustration: three shop page layouts: products only, categories only, and category tiles above the products
The three Shop page display choices. Categories and products together is the one most shops end up with.

The Product Catalog settings offer three choices for Shop page display:

  • Show products (the default): the shop page is one long product grid.
  • Show categories: only category tiles, no products. Shoppers must pick a category first. This suits shops with very different ranges, where a mixed grid of everything helps nobody.
  • Show categories & products: tiles first, then the product grid beneath. This is the usual choice, because shoppers who don’t want to browse by category can simply scroll.

Next to it, Category display does the same job for category pages: show products, subcategories, or both. And each category can override that default on its own: edit it under Products → Categories and change Display type. A parent like “Clothing” can show its subcategory tiles while every other category shows products.

In a block theme#

These settings belong to the classic template system. In a block theme, such as the recent default WordPress themes, the shop page comes from the Product Catalog template in Appearance → Editor → Templates, built from blocks. To show categories there, open that template and add a product categories block above the product collection. The block has its own options for counts, images and empty categories, so check them in the editor rather than in the Customizer.

Why categories don’t show on the shop page#

The setting is saved, yet the tiles aren’t there, or they come and go. WooCommerce decides what to show on each page load, and these are the cases where it shows products only:

SituationWhat WooCommerce shows
A product search, or any filter (price, attribute, rating) is appliedProducts only
Page 2 and later of the shopProducts only, unless the setting is “Show categories”
No category has published, visible productsProducts only
A category has no visible productsThat tile is left out
The theme replaced WooCommerce’s product loopWhatever the theme decides

The first two are deliberate: someone searching wants results, not tiles. The fourth catches most people. A tile only appears if the category’s storefront count is above zero, and that count leaves out hidden products and, when you hide out-of-stock items, products that are out of stock. Our guide to the WooCommerce product category count explains both counts and how to recount them when they are stale.

Only top-level categories appear on the shop page. If everything is filed under one parent, such as “Shop”, you will see a single tile. Either move the main categories to the top level or set that parent’s Display type to show subcategories, and link to it from the menu. When a parent shows no products at all, our guide to a parent category not showing products goes through the causes in order.

How to change the order of category tiles#

Tiles follow the category order you set under Products → Categories, where top-level categories can be dragged up and down the list. Put your bestselling category first, keep seasonal ones near the top while they are in season, and move “Uncategorized” to the end, or better, rename it to something real like “Other” or give its products proper categories. If your theme or a page builder shows categories in alphabetical order regardless, its own category widget is ignoring the term order, and its settings are the place to look.

Each tile uses the category’s Thumbnail image, set when you edit the category. Use images of the same shape and size for all of them; a grid of mismatched photos is what makes a category layout look unfinished. Tiles without an image show WooCommerce’s grey placeholder.

In classic themes, tiles sit in the same grid as products, so the Products per row setting on the same Product Catalog screen also sets how many tiles fit in a row. Four main categories in a four-column grid fill one tidy row; five leave one tile alone on the next line, which looks like a mistake. Either add or merge a category, or change the columns. Each tile also shows the number of products in brackets after the name. Many shops remove it, because a small number makes a category look thin. Return an empty string from the woocommerce_subcategory_count_html filter to hide it.

How to hide a category from the shop page#

“Hide a category” means one of two things, and they need different fixes.

Hide the category’s tile#

Since WooCommerce 11.1 the list of category tiles passes through a filter, so a few lines of code can leave out a tile by its category ID (shown when you hover over the category under Products → Categories). Add it with a code snippets plugin or a child theme:

add_filter( 'woocommerce_product_subcategories_args', function ( $args ) {
    $args['exclude'] = array( 15, 27 ); // category IDs
    return $args;
} );

WooCommerce caches the list of tiles, so if your host runs a persistent object cache (Redis or Memcached), flush it after adding the snippet. The category and its products stay reachable from menus, links and search.

Hide the category’s products from the shop page#

For products, there are two routes. Without code, set each product’s Catalog visibility (in the Publish box) to “Search results only” or “Hidden”. That removes it from the shop page and from category pages too, which is what you want for, say, trade-only items reached by a direct link. To keep a category’s products off the main shop page only, while its own category page still lists them, use the product query hook:

add_action( 'woocommerce_product_query', function ( $q ) {
    if ( ! is_shop() ) {
        return;
    }
    $tax_query   = (array) $q->get( 'tax_query' );
    $tax_query[] = array(
        'taxonomy' => 'product_cat',
        'field'    => 'slug',
        'terms'    => array( 'gift-cards' ),
        'operator' => 'NOT IN',
    );
    $q->set( 'tax_query', $tax_query );
} );

Replace gift-cards with the category’s slug. Products in that category and in another one are hidden too, because the rule excludes anything filed under it. Hiding a category is not hiding its prices or keeping it private; for that, see our guide to hiding prices for a specific category.

Which categories deserve a tile#

Tiles are prime space: they are the first thing a visitor sees on the shop page. The best-performing set usually mixes your main ranges with two or three collections people actually look for:

  • Sale, holding whatever is currently discounted. See our guide to a WooCommerce sale category.
  • New arrivals, holding only recent products. See our guide to a new arrivals category that keeps old products out.
  • Best sellers or back in stock, for returning customers.

The catch is upkeep. A “Sale” category filled by hand still holds last month’s offers; a “New” category keeps products from the spring. And because empty categories drop off the shop page, a sale tile vanishes the day the last discount ends and reappears when someone remembers to refill it. Our comparison of four ways to automate category membership covers the options.

Keeping shop page categories full with Smart Categories#

Smart Categories is our plugin for that upkeep. The free version on WordPress.org fills an ordinary WooCommerce category from rules, such as “on sale”, “added in the last 30 days” or “price under 50 AND colour is black”, with a live preview of which products match before you save. Membership refreshes when a product, price or stock level changes, plus a daily sweep, so a product that stops matching leaves on its own, and products you added by hand are never removed.

Smart Categories overview: ready-made New Arrivals, Back in Stock, On Sale and Best Sellers categories with product counts
Smart Categories: ready-made rule-based categories, with the number of matching products shown before you create them.

Because the result is a normal product category, its tile appears on the shop page like any other, in the order you drag it to, and you can sort its own page by best-selling, newest, price or rating with out-of-stock products pushed to the end. Smart Categories Pro adds subcategories generated from attribute values, such as one per colour or brand, which suits a category page set to show subcategories. Our overview of WooCommerce product category plugins compares it with the alternatives by job.

Showing categories on the WooCommerce shop page: frequently asked questions#


How do I show categories on the WooCommerce shop page?

In a classic theme, go to Appearance, Customize, WooCommerce, Product Catalog and set Shop page display to Show categories, or Show categories and products, then publish. In a block theme, edit the Product Catalog template in the Site Editor and add a product categories block above the products.


Why are my categories not showing on the shop page?

WooCommerce shows products only during a search or when a filter is applied, on page 2 and later, and when no category has visible products. A single category is left out when its storefront count is zero, for example because its products are hidden or out of stock. Only top-level categories appear.


How do I hide a category from the WooCommerce shop page?

To hide its tile, exclude its ID with the woocommerce_product_subcategories_args filter (WooCommerce 11.1 and later). To keep its products off the shop page while its own category page still lists them, add a NOT IN tax query on the woocommerce_product_query hook when is_shop() is true.


How do I change the order of categories on the shop page?

Drag the categories into the order you want under Products, Categories. The shop page tiles follow that order. If your theme or page builder shows them alphabetically anyway, its own category element is ignoring the term order and needs changing in its settings.


Can I remove Uncategorized from the shop page?

WooCommerce always keeps one default category, so it can’t be deleted, but its tile only appears while it holds visible products. Give those products proper categories, or rename Uncategorized to something useful and move it to the end of the category order.


More in Product Catalog

Keep exploring

All articles
Before you go Let Smart Categories do this in WooCommerce

Define the rules for a WooCommerce category once. Matching products enter automatically and leave when they no longer qualify.

Explore Smart Categories Get the free version

Free version on WordPress.org · Pro from $59/year