This topic has 4 replies, 2 voices, and was last updated 6 years, 3 months ago ago by Olga Barlow
Hello, in content-product.php , I’ve seen this code echo all product categories for each product.
<?php if (etheme_get_option('product_page_cats')): ?>
<div class="products-page-cats">
<?php
$size = sizeof( get_the_terms( $post->ID, 'product_cat' ) );
echo $product->get_categories( ', ' ) . get_post_meta( $post->ID, '_year', true );
?>
</div>
<?php endif ?>
What if I’ve created let’s say two new product category call “Test” and “Test2”, but I don’t want to display both of those new category for product loop. What should I add inside the code?
Hello,
This functionality is the default WooCommerce functionality and is not related to our theme. You can check and try this solution https://stackoverflow.com/questions/48848387/hide-product-category-from-category-list-on-shop-page-in-woocommerce
Regards
Yeah, thought you guys can help with woocommerce too.
The link you gave me work for whole assign page. I’m more looking into direct edit the content-product.php only so that it only affects the product loop.
Anyway, thanks for the reply.
Hello,
Contact WooCommerce support about this, it’s related to WC plugin functionality.
Regards
Tagged: product
You must be logged in to reply to this topic.Log in/Sign up