Load gallery images on storefront with php, no plugins
-
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.
- The topic ‘Load gallery images on storefront with php, no plugins’ is closed to new replies.