WordPress.org

Support

Support » Plugins and Hacks » Adding image to attribute in woocommerce

Adding image to attribute in woocommerce

Viewing 6 replies - 1 through 6 (of 6 total)
  • Roy Ho
    Member

    @splashingpixelscom

    Images are added to the variation, not attribute itself.

    michaellek
    Member

    @michaellek

    You can indeed also add images to variations. In WooCommerce 1.6.6, it is also possible to add them to attributes, see this link

    I used this to set up this page, showing the brands from the store, with the 2.0.13 version of WooCommerce this is no longer possible

    Roy Ho
    Member

    @splashingpixelscom

    Why do you need attributes to setup that page when that page can be create via categories in which does have images…?

    michaellek
    Member

    @michaellek

    I tried to this at first as well, but didn’t succeed. Next to the categories that I have for brands, I also have categories for like trousers, shirts etc. I don’t know how I can only show brands there and not the other categories. Maybe you know this?

    Roy Ho
    Member

    @splashingpixelscom

    I don’t recall if WC already has a template tag for you to output this but you can do this yourself. So assuming “collecties” is a normal WP page, you can create a file named “page-collecties.php” in your theme folder and this file will be loaded whenever someone visits that page. So in that file, you can first copy the default loop from say the normal page.php file of your theme. Then utilize WP_Query to generate a new terms object of the brands you would like to show. The object will contain all the information you need including title/description/thumbnails…etc.

    Again, there may be already functions that do this by WC but I don’t remember. I usually build my own custom loops as this gives me full control of the output.

    michaellek
    Member

    @michaellek

    Hey Roy, thanks for your reply. I think I will use this as a fall back option. Still hoping WC already has an solution for this. That way the shop owner should be able to add brands himself.

    Like your work btw! For a new project I am looking for a experience WP /WC theme builder. Let me know if you are open for new projects? I can send you a mail through your website if you are interested.

    Thanks again for your help.

    Regards Michael

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Adding image to attribute in woocommerce’ is closed to new replies.