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"]
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?
Yes of course. The shortcodes are designed to show attribute images regardless of the WooCommerce product type.
Is it possible to show the description for the attribute image? For example as a tooltip?
A tooltip option is built in our plugin settings.
Hi, could it be that the URL is not working on the shortcode images? I get a href #. I use it on the product page.
Please submit a ticket on our website. We have a patch for that already.
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
Please submit a ticket on our website so we can check your issue.