[Support request] Remove woocommerce sidebar in mobile

Home Forums Support [Support request] Remove woocommerce sidebar in mobile

Home Forums Support Remove woocommerce sidebar in mobile

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #359067
    Alberto

    Hello.

    I’m using a left sidebar only in Woocommerce pages but I want to disable it in mobile devices.
    I was looking at this topic but I’m not sure if the best approach is via CSS or via Hooks…

    Could you tell me how to hide/disable the Woocommerce sidebar in mobile devices?

    Thanks

    #359154
    Leo
    Staff
    Customer Support

    Hi there,

    Give this CSS a shot:

    @media (max-width: 768px) {
        .woocommerce .sidebar {
            display: none;
        }
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    #359167
    Alberto

    Thanks Leo, works fine!

    Using CSS is the best choice?

    With secondary menu I just want to do just the opposite i.e. disable it for resolution greater than 768px, so should I use also CSS?

    Regards.

    #359291
    Leo
    Staff
    Customer Support

    CSS should fine.

    Yup something like this:

    @media (min-width:769px) {
        .secondary-navigation {
            display: none;
        }
    }
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.