Remove WooCommerce image

依然范特西╮ 提交于 2019-12-11 11:40:31

问题


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;
}

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.


回答1:


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 );

Also, added the following to custom.css

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


来源:https://stackoverflow.com/questions/26619633/remove-woocommerce-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!