logo woocommerce

How to Remove Product Categories in WooCommerce

When WooCommerce displays the single product page, by default it shows the products categories. If you're not using categories to organize your products, it's usually a better idea to remove this meta information altogether.
Table of Contents

If you purchase through a link on our site, we may earn a commission.

When WooCommerce displays the single product page, by default it shows the products categories. If you’re not using categories to organize your products, it’s usually a better idea to remove this meta information altogether.

All you need to do is to insert this code into your theme’s functions.php file:

remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );

It won’t work if you add it to a custom plugin on your site; it needs to go specifically in the theme’s functions.php file.

There is another way to achieve the same result and this is to modify the template for displaying single products in WooCommerce. A custom version of the template file can be saved in your theme’s folder and this will then override the one that is used by WooCommerce as a fallback. Don’t worry about theme updates, they won’t affect your custom product template.

You will need to look for the template file called content-single-product.php in the folder woocommerce>templates. You then take that file and copy it into your theme’s folder. All customizations you now apply there will override the original file.

Jean Galea is an investor, entrepreneur, and writer. He is the founder of WP Mayor, and the plugins WP RSS Aggregator and Spotlight. He also runs the Good Life Collective. Connect with him on X or visit jeangalea.com.

If you purchase through a link on our site, we may earn a commission.

More from our blog...

3 Responses

Post a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Stay updated with WP Mayor's newsletter showcase every week

Stay on top of every new WordPress innovation and latest launches. Receive all our fresh product reviews and expert guides directly in your inbox.