- This topic has 13 replies, 6 voices, and was last updated 3 years, 7 months ago by
David.
-
AuthorPosts
-
July 12, 2015 at 2:29 pm #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,
GregJuly 12, 2015 at 11:43 pm #120544Tom
Lead DeveloperLead DeveloperHi 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 π
July 13, 2015 at 8:24 pm #120818Greg
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. π
July 13, 2015 at 8:57 pm #120837Greg
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!
July 13, 2015 at 11:50 pm #120858Tom
Lead DeveloperLead DeveloperHmm, can you try this instead?:
add_action( 'wp_enqueue_scripts', 'generate_dequeue_mobile', 100 ); function generate_dequeue_mobile() { wp_dequeue_style( 'generate-mobile-style' ); }
July 14, 2015 at 10:11 am #120975Gregor 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,
–GregorJuly 14, 2015 at 10:17 am #120988Tom
Lead DeveloperLead DeveloperUgh, total brain fart.
I edited the code above – it should work now π
July 14, 2015 at 10:44 am #120994Gregor Smith
It does indeed work now – thank you very much!
July 14, 2015 at 11:01 am #120997Tom
Lead DeveloperLead DeveloperAwesome π
July 14, 2015 at 12:23 pm #121041Greg
Awesome, that seems to finally work on my end too!
Thanks so much for your help!
July 14, 2015 at 12:25 pm #121042Tom
Lead DeveloperLead DeveloperAwesome! π
July 14, 2015 at 12:32 pm #121044Greg
Just in case it helps your other users find this post, here are some keywords they might search for:
navbar, navigation, hide, disable
May 2, 2020 at 10:26 pm #1267006Shivam
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.May 3, 2020 at 6:01 am #1267301David
StaffCustomer SupportHi there,
this is a realllllly old post – would you mind starting a new topic where we can help π
-
AuthorPosts
- You must be logged in to reply to this topic.