First find this and then change it to
<?php the_post_thumbnail(); ?>
This
<?php the_post_thumbnail('post-image'); ?>
That should work
Which featured image? Post? Page? Product? Single Product?
Thread Starter
metice
(@metice)
It’s on the single product page
Thread Starter
metice
(@metice)
Hi James, would I need to copy all of that code to prevent the link? Also, which file should it be placed in? Many thanks.
Hey,
Add the following to wherever you’re making you’re edits;
add_filter( 'woocommerce_single_product_image_html', 'jk_remove_Featured_image_link' );
function jk_remove_Featured_image_link( $image ) {
global $post;
$image_title = esc_attr( get_the_title( get_post_thumbnail_id() ) );
$image = get_the_post_thumbnail( $post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ), array(
'title' => $image_title,
'alt' => $image_title
) );
return $image;
}
I’d recommend keeping your changes in a plugin such as; https://github.com/woothemes/theme-customisations
Cheers
Thread Starter
metice
(@metice)
Thanks James. I’ve added the code to the functions file and it has solved the problem.