如何删除添加到Woocommerce li.product中的类? [英] How to remove classes added to Woocommerce li.product?

查看:107
本文介绍了如何删除添加到Woocommerce li.product中的类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Woocommerce将分配的产品类别和属性作为自定义类添加到li.product

Woocommerce adds the assigned product categories and attributes as custom classes to li.product

<li class="post-120 product type-product status-publish has-post-thumbnail 
category1 category2 category3 category4 pa_one pa_two...">

我们为每种产品分配了很多类别,这会使网站变慢.有没有办法删除这些额外的类?

We have assigned quite a lot of categories to each product and it slows down the site. Is there a way to remove those additional classes?

推荐答案

如果您了解php,则可以编辑woocoommerce php模板文件以删除这些其他类. 如果打开该文件,则有一个php变量要添加其他类,它是一个数组.

If you know php, You can edit the woocoommerce php template file to remove those additional classes. If you opened the file, there is a php variable to be added additional classes and it is a array.

这篇关于如何删除添加到Woocommerce li.product中的类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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