-
Hi. The client has asked me in the product view to change the order of the photos in the gallery. so that the featured product photo in the category view is not the first in the product view gallery.
I have used this code: “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;
} ”to remove featured image from gallery in product view, but I have 2 problems:
1.The thumbnail of the featured image is not removed from the product page
2. Clicking on an image does not jump to the corresponding image but rather to the image below
I would think this can be fixed by removing the featured image from the thumbnail view.
Could you help me by indicating which line of code I can edit or add?
Thank you
remove featured image thumbnail from gallery
This topic is: not resolved