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"]

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

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

Example showing only specific attribute values on non product pages:

[woocommerce_attribute_images_attributes attributes="pa_color" values="black,grey" ignore_product="yes" hide_empty="yes"]

8 thoughts on “Shortcode for show Attributes Image

  1. Jerzy says:

    Hi there! Will those shortcodes will work with Beaver Builder? Also I don’t need to use it as a variations, just want to display image attributes on archives and product pages. Is it possible if attrivute is not used for creating variations?

  2. BIBOU says:

    I’m using a private theme but the attribute images is not showing in the product sidebar but it’s showing in the more ”information box” and i want to show the attribute image in the product sidebar

Leave a Reply

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