Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Modify kt_woocommerce_template_loop_product_thumbnail

Home / Forums / Virtue Theme / Modify kt_woocommerce_template_loop_product_thumbnail

This topic is: Not Resolved
[Not Resolved]
Posted in: Virtue Theme
April 8, 2016 at 9:02 am

Hi,

I want to modify kt_woocommerce_template_loop_product_thumbnail to pull external images from my affiliate sites.

Since I do not want to edit any core files, I am trying to accomplih this with a hook.

To start off i simply copied the entire function from custom-woocommerce.php and added it to my child theme’s functions.php using

remove_action( ‘woocommerce_before_shop_loop_item_title’, ‘kt_woocommerce_template_loop_product_thumbnail’, 10 );
add_action( ‘woocommerce_before_shop_loop_item_title’, ‘mk_woocommerce_template_loop_product_thumbnail’, 5 );
function mk_woocommerce_template_loop_product_thumbnail() {

Basically it seems to work, but the problem I am facing is that I now have two images in the product category pages above one another. How do I remove/disable the parent theme function placing the image?

Daniel

  • The forum ‘Virtue Theme’ is closed to new topics and replies.