Title: Clickable Thumbnails
Last modified: January 11, 2020

---

# Clickable Thumbnails

 *  Resolved [lagrant](https://wordpress.org/support/users/lagrant/)
 * (@lagrant)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/clickable-thumbnails-2/)
 * Hello [@prodesignswpsupport](https://wordpress.org/support/users/prodesignswpsupport/)
 * I have tried everything with child theme and hooks to make thumbnails clickable
   (
   content-product.php added hooks there). Unfortunately, nothing worked for me.
 * Could you please explain where to add and what hook to add?
 * Also for better mobile user experience, I have added next extra css:
 * For hiding add to cart button, since customer wants to visit the product page
   and only then add to cart …
    .add-to-cart-wrap { display: none; }
 * For hiding hover colour, since the product is not clickable and it confuses customers…
   
   li.product .product-thumb-wrap::before{ background: transparent; }
 * Maybe you can just edit the part with working hook?
 * Thanks alot!
    Alex
 * Here is the original code
 * <?php
    /** * The template for displaying product content within loops * * This
   template can be overridden by copying it to yourtheme/woocommerce/content-product.
   php. * * HOWEVER, on occasion WooCommerce will need to update template files 
   and you * (the theme developer) will need to copy the new files to your theme
   to * maintain compatibility. We try to do this as little as possible, but it 
   does * happen. When this occurs the version of the template file will be bumped
   and * the readme will list any important changes. * * [@see](https://wordpress.org/support/users/see/)
   [https://docs.woocommerce.com/document/template-structure/](https://docs.woocommerce.com/document/template-structure/)*
   [@author](https://wordpress.org/support/users/author/) WooThemes * [@package](https://wordpress.org/support/users/package/)
   WooCommerce/Templates */
 * if ( ! defined( ‘ABSPATH’ ) ) {
    exit; // Exit if accessed directly }
 * global $product;
 * // Ensure visibility
    if ( empty( $product ) || ! $product->is_visible() ) { 
   return; } ?>
 * <li <?php post_class(); ?>>
    <?php if ( class_exists( ‘YITH_WCWL’ ) ){
 *  $product_wrap = ‘product-thumb-wrap yith-enabled’;
 *  }else{
 *  $product_wrap = ‘product-thumb-wrap’;
 *  }
    ?>
 *  <div class=”<?php echo $product_wrap; ?>”>
    <?php
 *  /**
    * woocommerce_before_shop_loop_item_title hook. * * [@hooked](https://wordpress.org/support/users/hooked/)
   woocommerce_show_product_loop_sale_flash – 10 * [@hooked](https://wordpress.org/support/users/hooked/)
   woocommerce_template_loop_product_thumbnail – 10 */ do_action( ‘woocommerce_before_shop_loop_item_title’);?
   >
 *  <div class=”add-to-cart-wrap”>
    <?php /** * woocommerce_after_shop_loop_item
   hook. * * [@hooked](https://wordpress.org/support/users/hooked/) woocommerce_template_loop_product_link_closed–
   5 * [@hooked](https://wordpress.org/support/users/hooked/) woocommerce_template_loop_add_to_cart–
   10 */ do_action( ‘woocommerce_after_shop_loop_item’ ); ?> </div>
 *  <?php
 *  $show_detail_icon = ecommerce_gem_get_option( ‘show_detail_icon’ );
 *  if( ( true === $show_detail_icon ) || ( class_exists( ‘YITH_WCWL’ ) ) ){ ?>
   
   <div class=”view-detail-wishlist-wrap”> <div class=”view-detail-wishlist-inner”
   > <?php
 *  $wishlist_page_id = yith_wcwl_object_id( get_option( ‘yith_wcwl_wishlist_page_id’));
 *  if ( class_exists( ‘YITH_WCWL’ ) && ( absint( $wishlist_page_id ) > 0 ) ){ ?
   >
    <div class=”add-to-wishlist-wrap”> <?php echo do_shortcode( ‘[yith_wcwl_add_to_wishlist]’);?
   > </div> <?php }
 *  if( true === $show_detail_icon ){ ?>
 *  <div class=”view-detail-wrap”>
    <?php
 *  $link = apply_filters( ‘woocommerce_loop_product_link’, get_the_permalink(),
   $product );
 *  ?>
    ” class=”view-product”><i class=”fa fa-eye” aria-hidden=”true”></i>
   
    </
   div> <?php } ?> </div> </div>
 *  <?php
 *  } ?>
    </div> <div class=”product-info-wrap”> <?php
 *  /**
    * woocommerce_before_shop_loop_item hook. * * [@hooked](https://wordpress.org/support/users/hooked/)
   woocommerce_template_loop_product_link_open – 10 */ do_action( ‘woocommerce_before_shop_loop_item’);
 *  /**
    * woocommerce_shop_loop_item_title hook. * * [@hooked](https://wordpress.org/support/users/hooked/)
   woocommerce_template_loop_product_title – 10 */ do_action( ‘woocommerce_shop_loop_item_title’);
 *  /**
    * woocommerce_after_shop_loop_item_title hook. * * [@hooked](https://wordpress.org/support/users/hooked/)
   woocommerce_template_loop_rating – 5 * [@hooked](https://wordpress.org/support/users/hooked/)
   woocommerce_template_loop_price – 10 */ do_action( ‘woocommerce_after_shop_loop_item_title’);?
   > </div>
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fclickable-thumbnails-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [prodesignswpsupport](https://wordpress.org/support/users/prodesignswpsupport/)
 * (@prodesignswpsupport)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/clickable-thumbnails-2/#post-12336311)
 * Hello lagrant,
 * Greetings of the day!
 * To update these details, you need to create a child theme and then as ‘content-
   product.php’ file needs to be replaced with the new content-product.php file.
 * Please share your email address on [wpsupport@prodesigns.com](https://wordpress.org/support/topic/clickable-thumbnails-2/wpsupport@prodesigns.com?output_format=md).
   We will send you a file and step by step guild line.
 * Regards,
    Team ProDesigns
 *  Thread Starter [lagrant](https://wordpress.org/support/users/lagrant/)
 * (@lagrant)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/clickable-thumbnails-2/#post-12347580)
 * Perfect! Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

 The topic ‘Clickable Thumbnails’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/ecommerce-gem/2.1.7/screenshot.
   png)
 * eCommerce Gem
 * [Support Threads](https://wordpress.org/support/theme/ecommerce-gem/)
 * [Active Topics](https://wordpress.org/support/theme/ecommerce-gem/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/ecommerce-gem/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/ecommerce-gem/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [lagrant](https://wordpress.org/support/users/lagrant/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/clickable-thumbnails-2/#post-12347580)
 * Status: resolved