• Resolved josede

    (@josede)


    I am trying to display products in home page.
    I am using [products attribute="color" terms="brown"] because [woocommerce_product_filter_attribute attribute="color"] doesnt work.

    But [products attribute="colores" terms="brown"] displays the main image instead the variation image
    How can I achieve this?

    • This topic was modified 3 years, 6 months ago by josede.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Hey @josede,

    The only way I know of to do that is to duplicate the product and set the main product image to be the one you want to use in the shortcode. There isn’t a built-in way to show the variation’s image instead of the main product image.

    You might be able to use a plugin like this that will show individual variations in the main product list. I can’t guarantee that will work, but it might be worth looking into.

    https://iconicwp.com/products/woocommerce-show-single-variations/

    Hi @josede,

    Since we haven’t heard from you in a while, we’re hoping that means you were able to get this resolved. I’m going to close this thread out now.

    If you’re still having trouble, please open up a new topic and we’ll be happy to help out.

    Stay safe!

    Thread Starter josede

    (@josede)

    I am actually using ‘WPC Show Single Variations for WooCommerce’ and It doesnt work.

    But how can I show all the products related with a term (with his variation image). I think is something so normal.

    Or what can I do?

    I’d suggest reaching out to the developers of WPC Show Single Variations for WooCommerce and see if they can assist you. By default, WooCommerce shows the featured image of the parent product in lists. You would need a plugin like that in order to show the variation image that goes with one of these attributes.

    Thread Starter josede

    (@josede)

    Anyway, I am using a loop and I have all the products filtered by attribute and variation. How can I call the image variation?

    Mirko P.

    (@rainfallnixfig)

    Hello @josede,

    Probably this Stack Overflow thread can help you achieve your goal:

    https://stackoverflow.com/a/34943832

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘wrong image for attribute shortcode’ is closed to new replies.