By default, WooCommerce adds your categories on the single product pages.

Normally, they are displayed under the ‘Add to cart’ button.

I’m talking about this:

woocommerce categories on single product page

Unfortunately, WooCommerce doesn’t have a built-in setting to remove it, but I’ll show you how to easily do it without a plugin!

The fewer plugins you have, the better!

Remove Category from WooCommerce Product Page

WP Rocket - WordPress Caching Plugin

Before doing this, I recommend backing up your site or the functions.php file, just to be safe.

I also recommend having a child theme, otherwise, the changes will be gone with the next theme update.

If you don’t have a child theme, then use the Code Snippets plugin and add the code there.

For my example, I’ll use cPanel and a child theme.

Step 1

Access your WordPress theme files to edit functions.php found in your child theme’s folder.

This is the usual path:

public_html/wp-content/themes/YourThemeName-child/functions.php
edit functions.php cpanel
Editing functions.php via cPanel

Step 2

Add the following line of code right at the bottom of the file or right above the ?> ending tag (if any).

/* Remove Categories from Single Products */ 
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
remove category from product page in woocommerce

Save the file.

Final step

It will most likely be necessary to clear your site and browser cache in order to see the change.

Alternative: Hide Category from WooCommerce Product Page

While this method is simpler, it’s not the best on-page SEO practice because Google is not a fan of hiding content, especially when there are links involved.

Anyway, it might still be necessary.

So, add this CSS code in WordPress:

.product_meta .posted_in {display: none;}

Here’s how to add custom CSS in WordPress.

It might be necessary to clear your site and browser cache.

If the change still doesn’t take place after that, add !important to the code, like this:

.product_meta .posted_in {display: none !important;}

If it still doesn’t work, it might be that your theme modified the CSS selectors, and you’ll need to find them yourself.

That’s a Wrap

I hope you found this tutorial useful, and you managed to remove the category from the WooCommerce product page!

If you have any questions or thoughts, drop a comment or send a message via contact or Facebook page.

You can also hit the follow button on Twitter and subscribe to the YouTube channel.

Don’t forget to share the post to help out others!

wordpress services
contact
subscribe
Big Discounts for Domains, Hosting, SSL and more