0

How can I display the products of a category in my woocommerce theme ?

I'm going to design a woocommerce template and I want it in it display the products of a category .

For example : T-shirt category or ... .

4

1 回答 1

0

Code taken from Woo's github https://github.com/woocommerce/woocommerce/blob/master/templates/single-product/meta.php

global $product
echo wc_get_product_category_list( $product->get_id(), ', ', '<span class="posted_in">' . _n( 'Category:', 'Categories:', count( $product->get_category_ids() ), 'woocommerce' ) . ' ', '</span>' ); ?>
于 2017-12-06T16:46:54.160 回答