On my archive-product page I want to display some products from a specific category.
I tried to do this:
echo '<div>';
echo wc_get_product_category_list( 'special_items', $category ));
echo '</div>';
inside the product loop, but it doesn't work.
How can I achieve that?
In woocommerce some shortcode available. You may call echo do_shortcode in your template files
https://docs.woocommerce.com/document/woocommerce-shortcodes/#scenario-5-specific-categories
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.