Home › Forums › WoodMart support forum › ECHO WooCommerce attributes IMAGES
ECHO WooCommerce attributes IMAGES
- This topic has 3 replies, 2 voices, and was last updated 4 years, 8 months ago by Aizaz Imtiaz Awan.
-
AuthorPosts
-
December 29, 2019 at 8:09 pm #165450
damianmerinoParticipantIs there any way to echo via php the images of the attributes labels?
I need to echo the attributes IMAGES somewhere else in the SAME product page.
I’ve managed to echo the attributes text using this piece of php code but I need to output the IMAGES instead.
<?php function nt_product_attributes() { global $product; if ( $product->has_attributes() ) { $attributes = ( object ) array ( 'capacity' => $product->get_attribute( 'pa_capacity' ), 'size' => $product->get_attribute( 'pa_size' ), ); return $attributes; } } $attributes = nt_product_attributes(); echo $attributes->capacity; echo $attributes->size; ?>
Thank you for you help! 🙂
December 30, 2019 at 7:19 am #165487
Aizaz Imtiaz AwanKeymasterHello,
First of all thanks for choosing our Theme, we are glad to be you in WoodMart WordPress family
:-)
.If you want to display the attribute labels on product image then you can enable the “Show attribute label on products” option from Products >> Attributes >> Edit (Your specific attribute).
Screenshot: https://jmp.sh/cUDLNYD
Screenshot: https://jmp.sh/eJvxg7sOR
If you want to display the swatches images, then you can upload your image inside the specific attribute from “Image preview for this value” option inside the Products >> Attributes >> Configure Items.
Also you can follow the below documentation:
https://xtemos.com/docs/woodmart/variable-products-swatches/There is no other option display the labels via php code.
Best Regards.
December 30, 2019 at 7:59 am #165496
damianmerinoParticipantHello again,
I think you have misunderstood my question….
Those options are ALREADY ENABLED and SHOWING ON THE PRODUCT PAGE – what I want to do is show those images AGAIN in a sticky bar I have set up, so they will show in the product AND on the sticky bar
Please check example here… https://imgur.com/D7GZYTp
December 30, 2019 at 9:20 am #165519
Aizaz Imtiaz AwanKeymasterHello,
I have seen your screen shot and got your point that you want to display attribute images again on sticky bar.
Unfortunately there is no such option in theme settings to do this, it requires customization and this is beyond our limitations and support policy.
Best Regards.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register