最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Display <div> when items are in Woocommerce cart but hide when empty

programmeradmin0浏览0评论

I hope you can help me. I would like to display a div in a notification bar whenever there is an item (or items) in the Woocommerce cart but hide it if the cart is empty.

All I'm finding are ways to display a cart icon in the menu. But I don't want a cart icon, nor do I want it in the menu, and I definitely only want it to display if there's something in the cart.

I'm open to a CSS solution, script, or adding to function.php

Thank you for your assistance.

发布评论

评论列表(0)

  1. 暂无评论