Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor royho

    (@royho)

    Look into the product-image.php template file. That file generates the link and image. You can override that template by copying it into YOUR-CHILD-THEME/woocommerce/single/ folder and modify it.

    Thread Starter Atiqur Rahman

    (@atiqbd4ever)

    In product-image.php there is code
    echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '<a href="%s" itemprop="image" class="woocommerce-main-image zoom" title="%s" data-rel="prettyPhoto' . $gallery . '">%s</a>',$image_link, $image_caption, $image ), $post->ID);

    If i touch anything from there… image disappear. Don’t know how to get image without link!

    Plugin Contributor royho

    (@royho)

    You can change that line to

    echo $image;

    That should remove the surrounding anchor tag.

    Thread Starter Atiqur Rahman

    (@atiqbd4ever)

    Yes.. perfect. Thank you!

    How can I remove the link for just one product thumbnail image (but not all the others)? Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to remove single product image link?’ is closed to new replies.