Can’t make product images clickable

Question

I’ve tried many things and many solutions but i can’t make product images clickable. Here’s the code:

if ( has_post_thumbnail() ) {
    $images .= get_the_post_thumbnail( $post->ID, 'shop_catalog' );
} 

If i make the code look like this, it doesn’t show images:

return '<a href="' . get_permalink( $post->ID ) . '">' .  get_the_post_thumbnail( $post->ID, 'shop_catalog' ) . '</a>';
0
, , Lukas Baranauskas 6 years 2016-03-05T12:54:20-05:00 0 Answers 90 views 0

Leave an answer

Browse
Browse