Site logo

[Resolved] Turn Off Secondary Menu on Mobile

Home Forums Support [Resolved] Turn Off Secondary Menu on Mobile

Home Forums Support Turn Off Secondary Menu on Mobile

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #796996
    David

    Hi,

    I want to turn off the Secondary Menu on mobile devices, since I am using the Slide Out Menu for mobile only.

    I tried:


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

    But it did not work for me.

    Also looked to see if I could use a layout element for to hide, but mobile was not an option.

    What would you recommend?

    Thanks,

    David

    #797003
    Leo
    Staff
    Customer Support

    Hi there,

    Try this:

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

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

    Let me know if this helps 🙂

    #797533
    David

    Thanks Leo, it worked.

    #797883
    Leo
    Staff
    Customer Support

    No problem 🙂

    #1537857
    David

    How can I turn off Secondary Menu on Mobile without relying on css.

    Why?

    Because on desktop Google PageSpeed Insights drops my score from 100 to 93 for a Cumulative Layout Shift (CLS) greater than 1. While the mobile version still scores 100.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Turn Off Secondary Menu on Mobile’ is closed to new replies.