Learn in this tutorial how to remove categories from the WooCommerce product page using a simple code snippet.
One of the advantages of being an OsomCode subscriber is that you can propose tutorials. For example, a subscriber left me this suggestion:
Hello, how are you?
I would like to hide the categories of a product tab in WooCommerce. There are products with many and it looks ugly, can you hide them from the product page?
As she says, there are times when it is better not to display that information and leave the product page more “clean”.
So here’s how to do it:
Snippet to remove categories from WooCommerce product page
Option A – Remove it from the WooCommerce Template
This is the option I recommend you use as it saves loading that information (instead of hiding it).
Add the following code at the end of functions.php or in your functionality plugin:
With this second option you only prevent the information from being displayed.
As you can see, with a few lines of code you can remove the categories from WooCommerce product pages. You choose how. 😉
Any questions? Let me know in the comments.
And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉