Archived topic
How to Disable or Remove Woocommerce Categories displayed on Single Product Page
9 replies · Started by bluebit on October 30, 2019
How can I disable, hide, or remove the categories being shown from the Single Product Page. I only want to show the tags.
I tried this snippet, but it removed everything including the tags:
/* Remove Categories from Single Products */
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
Hi there,
Can you try the option in the customizer first?
https://docs.generatepress.com/article/woocommerce-overview/#single-product
Let me know :)
yes, i just tried it, but if I uncheck the option "display product meta data" it removes all the metadata, but I want to keep the tags meta data, only remove categories meta data
I see. Try this CSS:
.product_meta .posted_in {
display: none;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know :)
that worked, but left some white space, how to reduce the white space above the tags?
Try this:
.product_meta {
padding-top: 10px;
}
Let me know :)
amazing it worked thanks
No problem :)
do you have any filter so I can remove categories completely? It is for SEO purpose (not hiding by CSS display none)
Hi there,
Woo doesn't filter the Single Meta - you would need to make a copy of this template in your child theme:
And remove the line i highlighted.