• Resolved Callum

    (@callumalden)


    I currently have products with x10 images, 1 featured and 9 ‘attached’ in the gallery. This works great, I get the out-of-the-box storefront zoom-able gallery. Snazzy.

    What I would like to do is remove / hide the Featured Product image. And show the ‘attached’ / gallery images only. Essentially replace the Featured Image (on load) with the second image in the array.

    I found references online, but they don’t seem to work. Perhaps storefront uses new hooks-

    
    remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
    add_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_thumbnails', 20 );

    Any help most welcome. Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Jesse Pearson (a11n)

    (@jessepearson)

    Automattic Happiness Engineer

    @callumalden Not sure where you found the snippets to use, but I do not believe they will work for what you want. How the gallery works in WooCommerce changed recently. The Featured Image is displayed and the gallery images are shown underneath. The gallery images are controls for a slideshow to queue larger images to slide through the area where the Featured Image appears. It is in that larger area where images are able to be clicked or zoomed.

    It may be possible to have some custom JavaScript fire on page load to automatically move the slideshow to the second image, but that is beyond what we are able to assist with here.

    Thread Starter Callum

    (@callumalden)

    @jessepearson, good idea re. Javascript. That might be the simplest solution. Thank you. Is there a ‘hook’ for the first gallery item? ie. the Featured item.

    Thank you.

    Jesse Pearson (a11n)

    (@jessepearson)

    Automattic Happiness Engineer

    @callumalden I do not believe there’s a hook just for that item. The data would need to be collected as an array, then sorted/edited from there.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove Featured Image (only) from Storefront Single Product Page’ is closed to new replies.