Chap
Product attribute

For displaying products that have a specific attribute with WooCommere the [products] or [product_attribute] shortcodes can be used. If your WooCommerce version is lower than 3.2 then you should use the latter.

The appearance of the displayed products depends on your active theme, the following examples are using Chap theme, but the shortcodes work with any theme as long as you’re using WooCommerce.

Displaying WooCommerce products by attribute using the products shortcode
$20.00
View product
Sale!
$30.00$35.00
View product
[products attribute="color" filter="black" /]
WooCommerce product attribute shortcode
$20.00
View product
Sale!
$30.00$35.00
View product
[product_attribute attribute="color" filter="black" /]
Notes
The old product_attribute shortcode should be used for WooCommerce version 3.1 or lower.
Exit mobile version