storefront 去掉cart price

Storefront theme
************** Remove cart display from under header  ***************

Add this to your site’s CSS:

/* Remove shopping cart from header */

.woocommerce-active .site-header .site-header-cart {
display: none!important;
}

If you use a child theme, you can just add it to the bottom of our styles.css file, otherwise use it in customizer, there should be a place to add additional CSS in there. If none of these apply, use this: Simple CSS

**************  How to Hide/remove/disable Add to cart button in WooCommerce?  *********************

remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );


********** remove single product price 



add_filter('woocommerce_is_purchasable', 'my_woocommerce_is_purchasable', 10, 2);
function my_woocommerce_is_purchasable($is_purchasable, $product) {
        return ($product->id == whatever_mambo_jambo_id_you_want ? false : $is_purchasable);

}

短代码:

[featured_products per_page="3" columns="3"]



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值