• Resolved Z1gnol

    (@z1gnol)


    Hello,

    I hope someone can help me out. Woocommerce does not have a default function to show a secondary image of a product on the storefront when hovering over the thumbnail. There are plugins to do this, but they are either expensive or just plain bad.

    I think a rather simple principle could be applied to achieve the effect, by loading the first image of the product gallery to the storefront and fiddle around with CSS for the hover effect.

    Can anyone tell me how to load the gallery image, so its <img> tag gets printed right below the default image in the storefront html? I’m looking for a php function to add to my child theme. Woocommerce loads images in product-image.php, located in the templates folder.

Viewing 1 replies (of 1 total)
  • Hi @z1gnol

    Thanks for reaching out!

    I understand that you want to load the secondary image from the image gallery when you hover to the main product image thru the use of custom code, correct?

    This is a bit of a complicated topic that would need some customization to address. Unfortunately, custom coding is not something we can assist with directly. However, I’ll keep this thread open for a bit to see if anyone from the community can lend a hand.

    If you have any other questions related to development or custom coding, don’t hesitate to reach out to some of the great resources we have available for support. The WooCommerce community is filled with talented open-source developers, and many of them are active on the channels listed below:

    Hope this helps!

Viewing 1 replies (of 1 total)
  • The topic ‘Load gallery images on storefront with php, no plugins’ is closed to new replies.