Title: wrong image for attribute shortcode
Last modified: June 2, 2021

---

# wrong image for attribute shortcode

 *  Resolved [josede](https://wordpress.org/support/users/josede/)
 * (@josede)
 * [5 years ago](https://wordpress.org/support/topic/wrong-image-for-attribute-shortcode/)
 * 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 5 years ago by [josede](https://wordpress.org/support/users/josede/).

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [3 Sons Development](https://wordpress.org/support/users/3sonsdevelopment/)
 * (@3sonsdevelopment)
 * [5 years ago](https://wordpress.org/support/topic/wrong-image-for-attribute-shortcode/#post-14517798)
 * Hey [@josede](https://wordpress.org/support/users/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/](https://iconicwp.com/products/woocommerce-show-single-variations/)
 *  [3 Sons Development](https://wordpress.org/support/users/3sonsdevelopment/)
 * (@3sonsdevelopment)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/wrong-image-for-attribute-shortcode/#post-14541237)
 * Hi [@josede](https://wordpress.org/support/users/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](https://wordpress.org/support/users/josede/)
 * (@josede)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/wrong-image-for-attribute-shortcode/#post-14893658)
 * 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?
 *  [3 Sons Development](https://wordpress.org/support/users/3sonsdevelopment/)
 * (@3sonsdevelopment)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/wrong-image-for-attribute-shortcode/#post-14894001)
 * 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](https://wordpress.org/support/users/josede/)
 * (@josede)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/wrong-image-for-attribute-shortcode/#post-14903256)
 * 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.](https://wordpress.org/support/users/rainfallnixfig/)
 * (@rainfallnixfig)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/wrong-image-for-attribute-shortcode/#post-14930033)
 * Hello [@josede](https://wordpress.org/support/users/josede/),
 * Probably this Stack Overflow thread can help you achieve your goal:
 * [https://stackoverflow.com/a/34943832](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.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [Mirko P.](https://wordpress.org/support/users/rainfallnixfig/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/wrong-image-for-attribute-shortcode/#post-14930033)
 * Status: resolved