Find Answers and Get Support › Forums › Armadon – Gaming Community WordPress Theme › Feature Requests › Cart only appear when products in cart/ remove cart icon entirely
- This topic has 14 replies, 2 voices, and was last updated 2 years, 10 months ago by
Manathan.
-
AuthorPosts
-
ShikoroParticipant@alexfilutze
- 19 Topics
- 73 Posts
Up::0Hello team,
Looking to only have the cart icon appear when a product is added/ just remove it entirely.
Figured the setting would be under: Customize > Appearance > Navigation > Layout.
Can’t find a setting to change it as the icon is always showing next to the profile picture.
May 6, 2022 at 19:49 #40328@themodactyl- 0 Topics
- 6724 Posts
Hi Shikoro,
Thank you for bringing this issue to our attention. Maybe this topic will help you to solve your issue as it seems to answer the same concern:
Please note that this issue is related with the use of a third party plugin, not with the use of your theme.
We remain available for all support requests related with the use of your theme.
Regards,
May 9, 2022 at 11:33 #40357ShikoroParticipant@alexfilutze- 19 Topics
- 73 Posts
Ah looks like it has to do with grimlock, for anyone asking how to hide to entire cart you will need this class –
ul.grimlock-woocommerce-navbar_nav_menu.nav.navbar-nav.grimlock-navbar-nav--woocommerce.navbar-nav--woocommerce
May 9, 2022 at 22:26 #40365@themodactyl- 0 Topics
- 6724 Posts
Hi Shikoro,
Indeed, our theme display some additional style on the cart icon. However, changing this is considered customization work. Unfortunately, this is a service that we do not provide. We only share snippet only to solve issues with our theme. Any further request for CSS snippets will have to be part of a defect that needs to be fixed urgently. No snippets will be shared otherwise.
It seems you were able to solve this issue. Can you confirm me that? In that case, Thank you for sharing the solution with us. I’m sure it will help other users facing the same request. By doing this, you’ll make a great contribution to this forum, and we thank you very much for that! #SharingIsCaring 💪🏻
Thank you for your understanding.
May 10, 2022 at 08:27 #40370@themodactyl- 0 Topics
- 6724 Posts
Hi Shikoro,
I’m afraid that there is no feature in our theme that can allow you to do this. This is standard design and changing this is considered customization work.
However, we talked about this and we concluded that it would be indeed a very nice feature to add. For this reason, we took the liberty to move this topic to our Feature Requests forum. As your idea could be a nice addition to our theme, we will implement this feature if other community members upvote your request.
Waiting the feedback of other users, simply add the following code snippet to your website:
add_action( 'wp_footer', function() { if ( WC()->cart->is_empty() ) { echo '<style type="text/css">.navbar-nav--woocommerce, #navigation .grimlock-woocommerce-navbar_nav_menu{ display: none !important; }</style>'; } });
We found this snippet on wpfixit.com and tested it with Gwangi. All seems to work fine.
To add this code snippet to your site, we recommend that you use the Code Snippets plugin (https://wordpress.org/plugins/code-snippets/). If you have never activated this plugin, please read the following post: Adding Custom PHP Without Changing Your Child Theme.
Please also note that we don’t provide any theme customization. So, you shouldn’t expect other snippets from us unless it’s to fix an issue stemming from our own codebase. We always try our best to help theme users whenever we can and only provide code snippets out of courtesy to prevent them from waiting for the next update.
Regards,
May 13, 2022 at 14:39 #40476ShikoroParticipant@alexfilutze- 19 Topics
- 73 Posts
`add_action( ‘wp_footer’, function() {
if ( WC()->cart->is_empty() ) {
echo ‘<style type=”text/css”>ul.grimlock-woocommerce-navbar_nav_menu.nav.navbar-nav.grimlock-navbar-nav–woocommerce.navbar-nav–woocommerce{ display: none; }</style>’;
}
});This was the code I added or desktop in the function.php file for the child theme.
I removed the code I added and added in your and for desktop it still removes the cart, however if you were to go to our website on your mobile device it still does not remove the cart on mobile.
If you plan to add something to the theme this is something we could wait on but just wanted you to see the cart stays on mobile.
May 14, 2022 at 00:12 #40480 -
AuthorPosts
You must be logged in to reply to this topic.