- This topic has 26 replies, 3 voices, and was last updated 7 months, 1 week ago by
Tom.
-
AuthorPosts
-
July 26, 2020 at 12:10 pm #1377176
Tom
Lead DeveloperLead DeveloperHi there,
You should just be able to do this:
.secondary-navigation .secondary-menu-toggle { display: none; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJuly 26, 2020 at 12:39 pm #1377193Carsten
Hi there, yes, the css hides the secondary mobile menu, but I really would like to know, why this is happening after an update, and why it is necessary to add a code snippet to prevent the mobile menu to appear in the first place?
July 26, 2020 at 12:40 pm #1377195Tom
Lead DeveloperLead DeveloperIt depends on what version you updated to, and which update you came from. What version of GP and GP Premium are you using?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJuly 26, 2020 at 12:51 pm #1377199Carsten
GeneratePress Version: 2.4.2 and Premium Version 1.11.0-alpha.4
I have updated, every time a new update has been available.
But my point is, why it is necessary to add this code snippet below, when creating a secondary menu?
Besides, it is not working, so should I just delete it?
add_action( 'wp_enqueue_scripts', 'generate_dequeue_secondary_nav_mobile', 999 ); function generate_dequeue_secondary_nav_mobile() { wp_dequeue_style( 'generate-secondary-nav-mobile' ); }
July 26, 2020 at 12:53 pm #1377201Tom
Lead DeveloperLead DeveloperThat function removes the mobile CSS file for the secondary navigation. That file no longer exists as of GPP 1.11.0 as we moved everything into one file, which explains why it stopped working.
I’ll have to think about whether to undo that change or not before we enter beta testing.
Thanks!
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJuly 26, 2020 at 1:00 pm #1377208Carsten
That’s fine, I just wanted to know what was going on, if it was an issue in my set up only, that the code was not working anymore.
Thanks
July 27, 2020 at 9:57 am #1378269Tom
Lead DeveloperLead DeveloperI just released alpha.5 which should correct this.
Thanks!
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJuly 27, 2020 at 10:21 am #1378291Carsten
Hi there, thanks for letting me know. I updated the plugin, and deleted the code, but I’m still seeing two secondary menus on mobile. I have cleared the page cache, but I can’t yet for sure rule out it’s a cache issue.
I expect the update should work without this code:
.secondary-navigation .secondary-menu-toggle { display: none; }
July 27, 2020 at 10:33 am #1378304Tom
Lead DeveloperLead DeveloperIs this function still active on your site?:
add_action( 'wp_enqueue_scripts', 'generate_dequeue_secondary_nav_mobile', 999 ); function generate_dequeue_secondary_nav_mobile() { wp_dequeue_style( 'generate-secondary-nav-mobile' ); }
I’m seeing that file loading, so the style isn’t being dequeued.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJuly 27, 2020 at 10:39 am #1378313Carsten
No, I deleted that, I understood it was not needed anymore.
I will add the code later, and report back
July 27, 2020 at 12:28 pm #1378427Carsten
I pasted the code snippet in, and the issue is solved.
Thanks!
July 27, 2020 at 3:28 pm #1378582Tom
Lead DeveloperLead DeveloperNo problem! Thanks for letting us know 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.