Skip to main content
Login Join
Snippet · PHP

Remove the WooCommerce Product Categories from the Shop Page

Shared by Amit Dholiya · August 18, 2026 · @woocommerce_product_subcategories_args

9 views
Back to Snippets

If you want a cleaner WooCommerce shop page and don’t want product categories displayed above the product grid, you can remove the category display with a simple filter.

Steps

  1. Open your theme’s functions.php file.
  2. Add the code below.
  3. Save the file.
  4. Refresh your Shop page.

Done — WooCommerce product categories will no longer be displayed on the Shop page.

function hide_shop_product_categories( $args ) {
    if ( is_shop() ) {
        $args['hide_empty'] = true;
    }

    return $args;
}

add_filter(
    'woocommerce_product_subcategories_args',
    'hide_shop_product_categories'
);
Know a different way to do this? Add your approach as a variation so folks can compare them side by side.
Submit a variation

0 comments