Shortcode for to show Attributes Image

Filter & Hooks Viewed: 214

If you use custom product templates to show attribute images in product short description for example, you can use our new shortcode. The shortcode is [woocommerce_attribute_images_attributes] with parameters for product (optional) and attributes (attribute name, separated by comma).

Example to show attributes color and size for current product:

[woocommerce_attribute_images_attributes attributes="color,size"]

Example to show attribute color for product with the ID 354:

[woocommerce_attribute_images_attributes product="354" attributes="color"]

Leave a Reply

Your email address will not be published. Required fields are marked *