Home › Forums › WoodMart support forum › Get Attribute Image
Get Attribute Image
- This topic has 7 replies, 2 voices, and was last updated 3 years, 9 months ago by Elise Noromit.
-
AuthorPosts
-
January 18, 2021 at 3:14 pm #259402
pmctoolParticipantHow to grab the attribute image on the brands attribute? I’m able to get the description through code because it’s a default WC feature, but can’t seem to find the code for the Woodmart-specific attribute image.
January 18, 2021 at 5:50 pm #259447
Elise NoromitMemberHello,
Thank you very much for choosing our theme and for contacting us.
You can find all the detailed instructions here: https://xtemos.com/docs/woodmart/faq-guides/how-to-setup-brands/
As you can see you need to add the image to the attribute item and it would appear. If you need any further help, please contact me.
Best Regards
January 18, 2021 at 6:07 pm #259450
pmctoolParticipantNo, I’m not asking how to set them up. I’m asking what code to grab the image already set. I’m looking to display the brand’s image and description on the brand’s page itself.
January 18, 2021 at 10:26 pm #259515
Elise NoromitMemberHello,
You can create the template in the HTML block with an image and any content as per your needs and then add this HTML block to the Description of the Brand item as described here: https://xtemos.com/docs/woodmart/html-blocks-2/#cat_att_tag
Please let me know if you need further help.
Best Regards
January 26, 2021 at 2:49 pm #261544
pmctoolParticipantJust by creating an HTML block the image is not dynamic. I am looking to dynamically grab the attribute description (which I’ve done successfully) and the attribute image. But any documentation on the attribute image is not in the WooCommerce docs because it’s a Woodmart specific feature. Do you have the code or variable to grab the image set? I am applying this dynamically on all of my brands pages.
January 26, 2021 at 7:45 pm #261618
Elise NoromitMemberHello,
Please describe your purpose in more detail. Perhaps you can provide the screens. Do you want to show brand attributes images? How should they change dynamically? I will check with our dev team.
Best Regards
January 26, 2021 at 8:38 pm #261629
pmctoolParticipantI have created a shortcode to grab the term description of the brand. I’ve inserted the shortcode into the shop page widget area, and therefore this description changes according to what brand page is being viewed on the frontend. I am looking to be able to grab the term image associated with the brand to display this above the brand description on the frontend. See photos attached. (image1 is frontend display, image2 is backend brand attributes)
Attachments:
You must be logged in to view attached files.January 27, 2021 at 12:10 pm #261777
Elise NoromitMemberHello,
Please add a text block into the Shop page widget area and insert the shorcode.
Enable “Enable archives?” and insert the description into each attribute item. You can create HTML block and add any content https://xtemos.com/docs/woodmart/html-blocks-2/#cat_att_tag
Best Regards
-
AuthorPosts
Tagged: attribute, brands, image swatch
- You must be logged in to create new topics. Login / Register