Hello,
I have a ecommerce cart, built on woocommerce.
I need to hide the price in the category page for specific categories.
But the price should be displayed in the individual product page
Ive used this piece of code
following this article
The only issue being it hides the price for all categories, not specific ones
for example i want to hide headphones and covers.
Can someone please edit the code to hide only specific categories.
Thanks for helping
I have a ecommerce cart, built on woocommerce.
I need to hide the price in the category page for specific categories.
But the price should be displayed in the individual product page
Ive used this piece of code
PHP:
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
following this article
How to Remove Product Prices in WooCommerce
The most correct and clean way of removing product prices on the shop page, product archive pages, related products, upsells, cross-sells and single product pages.
rudrastyh.com
The only issue being it hides the price for all categories, not specific ones
for example i want to hide headphones and covers.
Can someone please edit the code to hide only specific categories.
Thanks for helping
Last edited: