Hide featured image on product page - by Joost van Kempen

Solved5 replies2 participantsUpdated by Eva Kemp

  • Avatar: bertplantagie
    Joost van Kempen
    Participant

    Hi SUpport,

    First of all: thanks for the recent 1.4 update, works smooth!

    Is it possible to hide/remove the featured image on the product page? We would like to only show product gallery images on the product page.

    Hope to hear from you soon and thanks in advance 🙂

    Kind regards,
    Joost

    5 Answers

    Avatar: Eva
    Eva Kemp
    Participant

    Hello,

    If you want to remove main product image you need use this code in custom.css file:

    .product-images-slider {
        display: none !important;
    }

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: bertplantagie
    Joost van Kempen
    Participant

    Hi Eva,

    Thank you for your quick reply again. Thank you for the code you provided, but it removes the whole image slideshow section 🙂 We just want to remove one image from the product page: the feautured image (the 1st image). So the product page only shows the images that are added to the product gallery images.

    Hope to hear from you soon. If you need more information please let me know.

    Kind regards,
    Joost

    Avatar: Eva
    Eva Kemp
    Participant
    Avatar: bertplantagie
    Joost van Kempen
    Participant

    Hi Eva,

    Thanks for the suggestions. Unfortunately, the suggested tutorials removed the whole gallery placeholder on the product page.

    I figured it out now. In your Royal child theme, navigate to woocommerce -> single-product folder. Edit the following files: (if not present, duplicate them from the parent Royal template)

    product-image.php: comment out the following code (lines 45-50):

                	<div>
    	                <?php echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '<a href="%s" itemprop="image" class="woocommerce-main-image zoom product-image" data-o_href="%s" title="%s">%s</a>', $image_link, $image_link, $image_title, $image ), $post->ID ); ?>
    	                <?php if($lightbox): ?>
    	                	<a href="<?php echo $image_link; ?>" class="product-lightbox-btn" <?php echo $data_rel; ?>>lightbox</a>
    	                <?php endif; ?>
                	</div>

    product-thumbnails.php: comment out the following line (line 35):

    echo sprintf( '<a href="%s" title="%s" class="active-thumbnail" %s ">%s</a>', $image_link, $image_title, $data_rel, $image );

    That did the job for me 😉

    Kind regards,
    Joost

    Avatar: Eva
    Eva Kemp
    Participant

    Hello,

    We’re glad you managed to fix it.

    Have a nice day.
    Regards,
    Eva Kemp.

The issue related to '‘Hide featured image on product page’' has been successfully resolved, and the topic is now closed for further responses