Site logo

[Resolved] add link before Woo cart on mobile menu

Home Forums Support [Resolved] add link before Woo cart on mobile menu

Home Forums Support add link before Woo cart on mobile menu

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1506556
    Damiaan van Vliet

    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!

    #1506832
    Leo
    Staff
    Customer Support

    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 🙂

    #1507289
    Damiaan van Vliet

    Great Leo! Thanks for the help.

    #1508126
    Leo
    Staff
    Customer Support

    No problem 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.