Project starten

Shortcode om attribuutafbeeldingen te tonen

Gebruik je eigen producttemplates, bijvoorbeeld om attribuutafbeeldingen in de korte beschrijving te tonen, dan kun je onze nieuwe shortcode gebruiken: [woocommerce_attribute_images_attributes], met de parameters product (optioneel) en attributes (attribuutnamen, gescheiden door komma’s).

Voorbeeld om de attributen kleur en maat van het huidige product te tonen:

[woocommerce_attribute_images_attributes attributes="color"]

Voorbeeld om het attribuut kleur van het product met ID 354 te tonen:

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

Voorbeeld dat alleen bepaalde attribuutwaarden toont op pagina’s die geen productpagina zijn:

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