• Resolved neyiox

    (@neyiox)


    Hello,

    My question is in the title, I would like the first image of the product gallery of my product to be the image display on the shop page (product catalog) instead of the Product Main Image !

    How can I do this ?

    Thanks a lot ????

Viewing 4 replies - 1 through 4 (of 4 total)
  • corsonr

    (@corsonr)

    Automattic Happiness Engineer

    Hi there,

    Here’s a tutorial that will guide you towards this goal, but this will require adjustments: https://toolset.com/forums/topic/need-to-display-woocommerce-image-gallery-instead-of-featured-image/

    Thread Starter neyiox

    (@neyiox)

    Thank you ! I understand that I have to make a new shortcode and place it into the template ?

    Isn’t there a way to just place a code in the functions theme ?

    Thanks again for your answer !

    corsonr

    (@corsonr)

    Automattic Happiness Engineer

    That’s correct.

    In this case the best method would be to work with WooCommerce custom templates. Basically a custom template allows you to override WooCommerce default files and use your own custom files instead. Here is a [quick tutorial](https://docs.woocommerce.com/document/template-structure/) that will explain you how to create your custom templates. Also, if some of your existing custom templates are outdated, I would suggest [updating them](https://docs.woocommerce.com/document/fix-outdated-templates-woocommerce/).

    WooCommerce comes with a number of front-end HTML templates as well as email templates. Instead of editing these files directly within the plugin (which is a very bad idea because once update the plugin and all of your changes will be lost!), you can copy them into your theme:

    1. In your theme directory, make a new folder called woocommerce.
    2. Navigate to the WooCommerce plugin directory and open the templates folder. The templates folder has a lot of subfolders with all of the different templates that WooCommerce uses.? Fortunately, the template file structure and naming in WooCommerce is easy to follow.
    3. In your newly created woocommerce folder, copy the template file that you want to edit. Remember to keep the directory structure the same here. If the template you want to edit is within a subfolder then remember to create that subfolder within your theme’s directory.
    4. Edit the file from within your woocommerce folder and save the changes.

    dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hey @neyiox

    Hopefully Remi’s fantastic details helped you to a solution here. As we haven’t heard back from you in a while I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Thanks,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Replace Product Image by First Product Gallery Thumbnail on Shop Page’ is closed to new replies.