Hide product feature picture from single page product

This topic has 2 replies, 2 voices, and was last updated 2 years, 10 months ago ago by Rose Tyler

  • Avatar: Jennifer
    Jennifer
    Participant
    February 18, 2022 at 18:33

    Hi there,

    I am trying to show different images on my shop/category page and the single product page.
    For that, I am trying to hide the feature image from the single product page.
    I am using this code that actually works:

    add_filter(‘woocommerce_single_product_image_thumbnail_html’, ‘remove_featured_image’, 10, 2); function remove_featured_image($html, $attachment_id ) { global $post, $product; $featured_image = get_post_thumbnail_id( $post->ID ); if ( $attachment_id == $featured_image ) $html = ”; return $html; }

    But, there is a blank space where the feature image should be.
    single product page
    And when clicking the second imagen, it brings the third image.
    Is there to solve this from the image gallery on the single product page?

    Thanks a lot!
    kind regards,
    Jenn

    Please, contact administrator
    for this information.
    1 Answer
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    February 19, 2022 at 13:14

    Hello,

    Sorry, but additional customization in files is outside the scope of our support.
    If you need help with the additional customization, submit a customization request to WPKraken team

    Regards

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

The issue related to '‘Hide product feature picture from single page product’' has been successfully resolved, and the topic is now closed for further responses

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