Website Building » WooCommerce » How Do I Remove Product Category in WooCommerce Product Page?

How Do I Remove Product Category in WooCommerce Product Page?

Last updated on October 1, 2022 @ 5:36 am

Product category is an important aspect of any eCommerce website as it helps to keep the products organised and makes it easier for customers to find what they are looking for. If you are using WooCommerce to sell products on your WordPress website, then you may want to know how to remove the product category from the product page.

The good news is that removing the product category from the WooCommerce product page is actually quite easy to do. All you need to do is edit the code in the single-product.php file of your theme.

You can access this file via the Appearance > Editor menu in your WordPress admin area.

Once you have opened up the single-product.php file, look for the line of code that says:

get_the_terms( $post->ID, ‘product_cat’ );

All you need to do is delete this line of code and save your changes. This will remove the product category from being displayed on the product page.

Conclusion:

Removing the product category from the WooCommerce product page is easy to do by simply editing the single-product.php file of your theme and deleting the line of code that says get_the_terms( $post->ID, ‘product_cat’ );. This will help keep your products organised and make it easier for customers to find what they are looking for.

Kathy McFarland

Kathy McFarland

Devops woman in trade, tech explorer and problem navigator.