• Resolved elrayes

    (@elrayes)


    when i use only one image in product the thumbnails in single product page is hidden but it leaves white space like ( margin in css )

    i tried to remove it (if only the product page has only 1 image )

    but i can’t find any solutions

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    Could you share a screenshot of the thumbnails area?
    I recommend?https://snipboard.io?for easily sharing screenshots – please follow the instructions on the page, then paste the URL in this chat. It works with Chrome, Firefox, Safari, and Edge.

    Additionally, please share links to products (a product with one image and another product with multiple images) so we can check and compare the difference.

    Thread Starter elrayes

    (@elrayes)

    hi
    here u are the screenshot
    https://snipboard.io/GZJrva.jpg

    note / the thumbnails is showing on right side
    https://snipboard.io/1evmD3.jpg

    • This reply was modified 2 years, 8 months ago by elrayes.
    Thread Starter elrayes

    (@elrayes)

    i tried this function to remove product thumbnail if only one image is added to product

    but it does’t work

    
    
    add_action( 'woocommerce_product_thumbnails', 'enable_gallery_for_multiple_thumbnails_only', 5 );
    function enable_gallery_for_multiple_thumbnails_only() {
        global $product;
    
        if( ! is_a($product, 'WC_Product') ) {
            $product = wc_get_product( get_the_id() );
        }
    
        if( empty( $product->get_gallery_image_ids() ) ) {
            remove_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );
        }
    }

    `

    (( the space problem with only product if only one image is added ))

    • This reply was modified 2 years, 8 months ago by elrayes.
    Mirko P.

    (@rainfallnixfig)

    Hi @elrayes,

    Checking the output on your product page I see this is styled using the Elementor plugin. Thus, you’d be best placed to reach out to the Elementor support team for assistance with modifying the column to contain the full image and remove vertical thumbnails as per your preference.

    You can reach their help center here: https://elementor.com/contact/.

    For help with customizations, I can also recommend reaching out to one of the customization experts listed here: https://woocommerce.com/customizations/.

    I’ll mark this topic as solved for now. Please feel free to open a new topic if you have any other questions specific to WooCommerce core features.

    Best regards.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to remove product vertical thumbnails if i use only one image’ is closed to new replies.