Woocommerce how to display products from specific category on archive page

ST80

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?

RSPR

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

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Get all WooCommerce products from a category that have specific meta data

WooCommerce: Check if is shop page and not archive / category

Woocommerce MySQL to update price of products in specific category

How can I sort my woocommerce products on the shop page by category

Display a notice in cart page if specific products are in WooCommerce cart

Display products from specific product category in Woocommerce

Exclude products from a product category on a specific page in Entrada theme

Hide products having a specific product category in Woocommerce

Nested shortcode to dynamically display WooCommerce products category

Set custom quantity arguments to products from specific category in WooCommerce

how to remove a category from woocommerce products through instantsearch js

Display with a shortcode a dropdown of Woocommerce products for a specific category

Replace Upsells with products from a specific product category in Woocommerce 3

Display product attributes on specific Woocommerce product category archives page

How do I show sold/out of stock items in a certain Woocommerce category archive page, but not display them in others?

Display All Products by Category with WooCommerce

How to get all products from current WooCommerce product category?

How do display top 5 products from specific category

Woocommerce adding custom product count to products only in specific category and in specific page

Opencart 2.3.0.2 How to display products of a particular category in front page with a flag

how can i get products for specific category from woocommerce restapi using php

how to show a category of woocommerce products

How to display posts from specific category in Ionic App Page

Woocommerce products from category loop

Display on a page all products below a specific price in Woocommerce

Remove "No products found" from a specific product category in Woocommerce

Add product category in woocommerce archive/shop page

Woocommerce - Display the product category under product title in shop/archive page

Apply discount on products within specific category (WooCommerce)