[英]Woocommerce - remove product-thumbnail from product category page
I've like to remove the product thumbnails (not display:none, but completely remove action) on Product Category Pages. 我想删除产品类别页面上的产品缩略图(不显示:无,但完全删除操作)。 Any suggestions? 有什么建议么?
I tried adding the following in my Wordpress functions file but didn't work: 我尝试在Wordpress函数文件中添加以下内容,但没有效果:
remove_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );
The hook used on the category page is: woocommerce_before_shop_loop_item_title
. 类别页面上使用的挂钩是: woocommerce_before_shop_loop_item_title
。
So you need to do the following: 因此,您需要执行以下操作:
remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );
Remove thumbnail category, go to file content-product-cat.php
and remove the following code: 删除缩略图类别,转到文件content-product-cat.php
并删除以下代码:
/**
* woocommerce_before_subcategory_title hook
*
* @hooked woocommerce_subcategory_thumbnail - 10
*/
do_action( 'woocommerce_before_subcategory_title', $category );
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.