doujinai2183 2018-09-03 20:59
浏览 55

修改商店页面上显示的Woocommerce店面产品属性

I have a woocommerce storefront theme with some product filters shown next to my product categories on the shop page. It makes sense to show these when products are shown, but not when categories are shown. (i show categories/subcategories first, then products underneath). I would like to be able to hide some of the product filter lists (ie. Size, Color) when the categories / subcategories are shown.

I know there is a hook for this somewhere - i have looked in their documentation and have tried quite a few, but they don't seem to work. Has anybody got some experience in this area of customising a woocommerce storefront theme?

For example: (this does not work)

function sp_attribute_filter(){
_e("it works!");
}

add_filter( 'woocommerce_attribute', 'sp_attribute_filter');

Thanks in advance!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 python的qt5界面
    • ¥15 无线电能传输系统MATLAB仿真问题
    • ¥50 如何用脚本实现输入法的热键设置
    • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
    • ¥30 深度学习,前后端连接
    • ¥15 孟德尔随机化结果不一致
    • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
    • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
    • ¥15 谁有desed数据集呀
    • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100