• Hi!
    I’m using your plugin to add variations images to the gallery and it works fine.
    On the other hand I’m trying to hide featured image on product page as I just want to show featured image on archive page.
    I’ve add this code that works fine for hiding featured image on product page:

    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 the problem is that when this plugin is activated code doesn′t work and featured image is showing again.
    Please, can you give a solution to hide featured image with no conflicts with your plugin?
    thanks,
    Ana Pascual

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Mamunur Rashid

    (@mamunur105)

    I need some information to check the issue.
    1. Your product URL.
    2. Your WordPress theme name.
    3. Plugin list.

    Thread Starter Ana Pascual

    (@anoni)

    Hi Mamunur,
    Thanks for your answer!
    1. https://mysite.com/producto/
    2. Genesis with a child theme named rustic: https://rustic.designbybloom.co/
    3. BC Menubar Cart Icon For WooCommerce
    Facebook for WooCommerce
    FiboSearch – AJAX Search for WooCommerce
    FooGallery
    GDPR Cookie Compliance
    Genesis Connect for WooCommerce
    Genesis Widget Column Classes
    Kadence Blocks
    Kadence Slider
    LiteSpeed Cache
    MC4WP: Mailchimp for WordPress
    Simple Social Icons
    Smash Balloon Instagram Feed
    Variation Images Gallery for WooCommerce
    Variation Swatches for WooCommerce
    WC – APG Envío por peso
    WooCommerce
    WooCommerce Google Analytics Integration
    WooCommerce Stripe Gateway
    Wordfence Security
    WP Featherlight
    Yoast SEO

    Thanks!
    Ana

    • This reply was modified 2 years, 4 months ago by Ana Pascual.
    Thread Starter Ana Pascual

    (@anoni)

    Hi,
    Could you find any solution?
    Thanks!!
    Ana

    Plugin Support Mamunur Rashid

    (@mamunur105)

    It takes a lot of debugging to figure out why the problem is happening. To give a solution without any kind of access, Whatever solution I give now has to be given based on ideas.

    We are trying to find the solution.

    Can you check again by increasing your priority Like 99? Check and reply : https://prnt.sc/o4GUYUcpgs6u

    the code is added below.

    add_filter('woocommerce_single_product_image_thumbnail_html', 'remove_featured_image', 10, 99 ); 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; }

    Plugin Support Mamunur Rashid

    (@mamunur105)

    You can add below code.

    add_filter('rtwpvg_get_image_props', 'rtwpvg_get_image_props', 10, 99); 
    
    function rtwpvg_get_image_props( $props , $attachment_id, $product_id){
        $featured_image = get_post_thumbnail_id( $product_id );
        if ( $attachment_id == $featured_image ) { 
            $props['src'] = ''; 
        }
        return $props;
    }
    Thread Starter Ana Pascual

    (@anoni)

    Hi!
    Thanks for the code; it works properly!!
    Great support!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Conflict with hiding featured image’ is closed to new replies.