Tagged: enfold, header, logo, shopping cart
-
AuthorPosts
-
October 30, 2018 at 12:21 pm #1027965
Hi there,
I’ve use a centered logo header and set the shopping cart to be displayed in the main menu. But the shopping cart is shown floating on the right hand side next to the logo. I want the shopping cart to be in the actual menu. How can I achieve this? Maybe you should update this in the template since it says “attached in main menu” but it isn’t…
Kind regards, Luuk
October 30, 2018 at 4:24 pm #1028129Hey VanDongenOnline,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaOctober 30, 2018 at 4:28 pm #1028134This reply has been marked as private.November 3, 2018 at 5:35 pm #1029503Hi,
To move the cart into the menu nav, Try adding this code to the end of your functions.php file in Appearance > Editor:
function cart_in_nav(){ ?> <script> (function($){ $(document).ready(function(){ var width = $(window).width(), height = $(window).height(); if ((width >= 768)) { $( "#menu-item-shop" ).appendTo( "#avia-menu.av-main-nav" ); }; }); })(jQuery); </script> <?php } add_action('wp_footer', 'cart_in_nav');
and this code in the General Styling > Quick CSS field:
/* cart_in_nav */ @media only screen and (min-width: 767px) { #top #header_main ul#avia-menu ul#menu-item-shop,#top #header_main ul#avia-menu ul#menu-item-shop a.cart_dropdown_link { display: block !important; height: 50px !important; line-height: 50px !important; padding: 1px 10px !important; border: none !important; box-shadow: none !important; } #top #header_main ul#avia-menu ul#menu-item-shop ul.woocommerce-mini-cart.cart_list.product_list_widget { width: 100% !important; height: 100% !important; } #top #header_main ul#avia-menu ul#menu-item-shop .woocommerce-mini-cart-item.mini_cart_item a { border: none !important; } #top #header_main ul#avia-menu ul#menu-item-shop .woocommerce-mini-cart__buttons.buttons a { border: none !important; } } /* end cart_in_nav */
Best regards,
MikeNovember 23, 2018 at 12:51 pm #1036939Thanks, the code is working. But there is another problem. If you go to shop and add something to the cart on mobile, the cart counter is displayed underneath the menu bar. How is that possible? I included the link to the website.
November 24, 2018 at 9:13 pm #1037285 -
AuthorPosts
- You must be logged in to reply to this topic.