Website Building » WooCommerce » How Do I Make WooCommerce Thumbnails Clickable?

How Do I Make WooCommerce Thumbnails Clickable?

Last updated on October 1, 2022 @ 11:57 pm

If you want to make the WooCommerce thumbnails clickable, there are a few steps that you need to follow. First, you need to edit the functions.php file and add the following code:

function WooCommerce_template_loop_product_thumbnail() {

echo ‘‘ . WooCommerce_get_product_thumbnail() . ‘‘;

}

After you have added that code, save the changes and upload the file to your server. The next step is to go to the WordPress Dashboard and navigate to Appearance > Editor.

On the right hand side, you will see a list of files. Find the functions.php file and click on it. Once you are in the editor, look for the following line of code:

PRO TIP: If you are not familiar with coding or website design, do not attempt to make WooCommerce thumbnails clickable. This can result in broken links and images on your website. If you are unsure how to do this, please consult with a professional or ask for help in the WooCommerce support forums.

add_action( ‘woocommerce_before_shop_loop_item’, ‘woocommerce_template_loop_product_thumbnail’, 10 );

If you can not find that line, then please add it at the bottom of the file. Once you have made sure that the line is added, click on the Update File button.

Conclusion:

Now when you go back to your website and visit the shop page, you will see that all of your thumbnails are clickable. If you have any further questions or comments, please feel free to leave them below.

Kathy McFarland

Kathy McFarland

Devops woman in trade, tech explorer and problem navigator.