• Resolved Abdallah_Mohsen

    (@abdallah_mohsen)


    Hello

    is there a way to show product gallery in shop/archive page or even custom loop and be compatible with the variation clicks, so when clicking on variation it loads its own gallery , not just one image ,

    meaning , making it work kind of like the single product page

    i’ve managed to get the main gallery , but when click on variation of course it doesn’t change , here is the code

    <?php 
    
    // Get product image gallery
    $gallery = $product->get_gallery_image_ids();
    // Check if there are images in the gallery
    if (!empty($gallery)) {
    echo '<div class="product-gallery-slider">';
    foreach ($gallery as $image_id) {
    echo '<img src="' . wp_get_attachment_image_url($image_id, 'large') . '" alt="' . get_the_title() . '">';
    }
    echo '</div>';
    } ?>

    Thanks in advance ??

Viewing 1 replies (of 1 total)
  • Plugin Support fizanzvai

    (@fizanzvai)

    @abdallah_mohsen

    Thanks for reaching out to us. Unfortunately, the feature is not available right now. Our plugin will only work for the single product page.

    Thanks for providing the code. Unfortunately, it is beyond our support scope when you want a custom solution. It is not about only displaying, there are some other works with JS to target only specific galleries. You already know there are several products on the archive page.

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘show product gallery in shop/archive page’ is closed to new replies.