.


Divya

How to add link to product image woocommerce (Wordpress)


Add link to product image is very easy.Just follow the below step to easily add link to product image.

Step(1)-Go to Public_html-> wp-contents-> Click On your theme folder -> woocommerce-> content-product.php

Step(2)-Then edit the code like this code.

<a href="<?php the_permalink(); ?>">
<?php
/**
* woocommerce_before_shop_loop_item_title hook
*
* @hooked woocommerce_show_product_loop_sale_flash - 10
* @hooked woocommerce_template_loop_product_thumbnail - 10
*/
do_action( 'woocommerce_before_shop_loop_item_title' );
?>
<h3><?php the_title(); ?></h3>
<?php
/**
* woocommerce_after_shop_loop_item_title hook
*
* @hooked woocommerce_template_loop_rating - 5
* @hooked woocommerce_template_loop_price - 10
*/
do_action( 'woocommerce_after_shop_loop_item_title' );
?>
</a>

Step(3)-Now check your product image of your site it must be working fine.

Thank U


Related topic

How to remove product-category from URL in woocommerce (Wordpress)

.