Hide featured image on product page - by Joost van Kempen

This topic has 6 replies, 2 voices, and was last updated 10 years ago ago by Eva Kemp

  • Avatar: bertplantagie
    Joost van Kempen
    Participant
    October 29, 2014 at 11:10

    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
    Support staff
    October 29, 2014 at 14:17

    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
    October 29, 2014 at 17:00

    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
    Support staff
    October 29, 2014 at 19:07
    Avatar: bertplantagie
    Joost van Kempen
    Participant
    October 30, 2014 at 09:48

    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
    Support staff
    October 30, 2014 at 14:39

    Hello,

    We’re glad you managed to fix it.

    Have a nice day.
    Regards,
    Eva Kemp.

  • Viewing 6 results - 1 through 6 (of 6 total)

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

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.