New to this New to this - 4 months ago 24
PHP Question

Remove tags from product page in Woocommerce

Sorry for super-beginner question, but I want to remove/hide where below the product description in woocommerce, it says the category. I mean this:

https://i.snag.gy/xczFOT.jpg

I have been searching how to do it and apparentely is as easy as adding this:

.product_meta {
display: none;
}


However, I have tried pasting that everywhere I could and nothing changed:


  • I have tried on the Custom CSS box that my theme has in its options

  • I have tried the woocommerce editor (plugings - editor)

  • I have tried in the Stylesheet of my theme in appearance - editor



And nothing work

Could someome please explain to me where to add it? Or if that code is not the way of doing this?

Please, keep in mind I am a really beginner. I need a step by step like: Go to Appearance - editor - xxx - in the dropdown menu chose xx - then xx - then paste this - then save changes

Otherwise I will not know how to follow your instructions. thanks!

Answer

You should use the woocommerce action to remove the categories. Please add the code below to your functions.php

add_action( 'after_setup_theme', 'my_after_setup_theme' );
function my_after_setup_theme() {
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
}