Introduction
By default, BuddyBoss does not provide an option to hide the Shopping Cart icon for users who are not logged in. Using a CSS snippet, you can remove the cart icon from the header for logged-out users, keeping the interface cleaner and encouraging users to log in before accessing shopping features.
Custom Workaround
Follow the steps below to hide the Shopping Cart icon for logged-out users:
- Go to BuddyBoss > Theme Options
- Under Custom Codes, enable CSS
- Append the following:
body:not(.logged-in) .header-aside-inner div.cart-wrap { display: none; }- Save changes.
Troubleshooting and FAQs
Q: Will this hide the cart icon for logged-in users?
A: No. The CSS only targets users who are not logged in. Logged-in users will still see the cart icon.
Q: The cart icon is still visible after adding the code. What should I do?
A: Clear your site cache and browser cache. If the icon still appears, submit a ticket to the support team for assistance.
Q: Does this remove cart functionality for logged-out users?
A: No. This only hides the visual icon. Users simply cannot access the cart unless they log in.
Q: Can I hide the cart icon only on certain pages?
A: Yes. You can modify the CSS to include specific page IDs to target only certain pages.