Archived topic
add link before Woo cart on mobile menu
3 replies · Started by Damiaan van Vliet on October 27, 2020
Hi support,
I want to add a link before the Woo cart icon on the mobile menu.
I can e.g. add a text before it with CSS like this:
.mobile-bar-items.wc-mobile-cart-items::before {
content: "X";
}
But it would be great that I could click on the X :)
I will replace the X later on with a heart symbol which will point to a wish list. That's the whole idea behind it.
I think I can do it with a function, could you please point me in the right direction?
Thanks!
Hi there,
I would say the easiest method is to use the generate_menu_bar_items hook as instructed here:
https://docs.generatepress.com/article/generate_menu_bar_items/
Then you can add the hide-on-desktop class to hide the content on desktop:
https://docs.generatepress.com/article/responsive-display/#using-our-hide-on-classes
Let me know if you need more info :)
Great Leo! Thanks for the help.
No problem :)