删除WooCommerce图片 [英] Remove WooCommerce image

查看:223
本文介绍了删除WooCommerce图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

按照此处的指示,我插入了以下代码,以阻止我的产品图片以全宽度显示WooCommerce。

As directed here, I inserted the following code to stop my product images from showing at full width with WooCommerce.

.single-product .product .summary 
{ 
   width: 100% !important; 
   float: none !important;
}

由于我更新了我的主题/ Woocommerce,此代码不再有效(产品图片仍然显示)。

Since I update my theme/Woocommerce, this code no longer works (the product image still appears).

请帮我处理删除产品图片的代码。

Please help me with code to remove the product image.

推荐答案

我自己想通了。在wc-template-hooks.php(WEBSITE/ wp-content / plugins / woocommerce / includes)中,我改变了:

I figured it out myself. In wc-template-hooks.php ("WEBSITE"/wp-content/plugins/woocommerce/includes) I changed:

add_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );

TO

remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );

另外,将以下内容添加到custom.css

Also, added the following to custom.css

.single-product .product .summary 
{ 
   width: 100% !important; 
   float: none !important;
}

这篇关于删除WooCommerce图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆