Black Friday sale! Get up to 25% off GP Premium! Learn more ➝

[Resolved] Possible to *not* turn nav bar into a button on mobile?

Home Forums Support [Resolved] Possible to *not* turn nav bar into a button on mobile?

Home Forums Support Possible to *not* turn nav bar into a button on mobile?

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #120461
    Greg

    Dear GeneratePress,

    On small screens the nav bar turns into a button/menu.

    Is there a way to prevent this theme from doing that?

    Thanks so much for your help with this!

    Sincerely,
    Greg

    #120544
    Tom
    Lead Developer
    Lead Developer

    Hi Greg,

    There definitely should be πŸ™‚

    First, add this CSS: https://gist.github.com/generatepress/1442471cf3e3651d1725

    Then, add this PHP:

    add_action( 'wp_print_scripts', 'generate_dequeue_mobile', 100 );
    function generate_dequeue_mobile() {
       wp_dequeue_style( 'generate-mobile-style' );
    }

    Adding CSS: http://generatepress.com/knowledgebase/adding-css/
    Adding PHP: http://generatepress.com/knowledgebase/adding-php-functions/

    That should do it πŸ™‚

    #120818
    Greg

    Has anyone ever told you that your dedication and customer support is first rate?

    I haven’t tried making these modifications yet, but I trust that if there’s an issue I can count on you to help with it.

    You’ve got yourself a new fan and a new customer. πŸ™‚

    #120837
    Greg

    Hmm, OK, so I just:

    • Purchased the GP Premium add-on and installed it.
    • Downloaded and installed the child theme (and activated it).
    • Copy/pasted the CSS and PHP into their corresponding areas.

    And it doesn’t work. πŸ™

    When I shrink the width of the page it still shows the menubar.

    I made sure to clear the page cache (I have W3 Total Cache installed) and refreshed the site in both Safari and Firefox and it doesn’t work in either. Still shows the nav.

    After posting this I’ll send you an email with my website’s address so you can see for yourself.

    Help very much appreciated!

    #120858
    Tom
    Lead Developer
    Lead Developer

    Hmm, can you try this instead?:

    add_action( 'wp_enqueue_scripts', 'generate_dequeue_mobile', 100 );
    function generate_dequeue_mobile() {
       wp_dequeue_style( 'generate-mobile-style' );
    }
    #120975
    Gregor Smith

    Hi Tom,

    I can’t speak for the OP, but I’m trying to make the same change and neither of those solutions are working for me – it still shows the menu button on mobile devices.

    Any other tricks up your sleeve? πŸ™‚

    Many thanks,
    –Gregor

    #120988
    Tom
    Lead Developer
    Lead Developer

    Ugh, total brain fart.

    I edited the code above – it should work now πŸ™‚

    #120994
    Gregor Smith

    It does indeed work now – thank you very much!

    #120997
    Tom
    Lead Developer
    Lead Developer

    Awesome πŸ™‚

    #121041
    Greg

    Awesome, that seems to finally work on my end too!

    Thanks so much for your help!

    #121042
    Tom
    Lead Developer
    Lead Developer

    Awesome! πŸ™‚

    #121044
    Greg

    Just in case it helps your other users find this post, here are some keywords they might search for:

    navbar, navigation, hide, disable

    #1267006
    Shivam

    Hey I am trying to acheive the same thing.
    Not working for me in 2020.
    I added CSS to the customize -> aditional css
    Added php using code snippets.

    #1267301
    David
    Staff
    Customer Support

    Hi there,

    this is a realllllly old post – would you mind starting a new topic where we can help πŸ™‚

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