[Resolved] Double secondary menu issue

Home Forums Support [Resolved] Double secondary menu issue

Home Forums Support Double secondary menu issue

Viewing 12 posts - 16 through 27 (of 27 total)
  • Author
    Posts
  • #1377176
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You should just be able to do this:

    .secondary-navigation .secondary-menu-toggle {
        display: none;
    }
    #1377193
    Carsten

    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?

    #1377195
    Tom
    Lead Developer
    Lead Developer

    It depends on what version you updated to, and which update you came from. What version of GP and GP Premium are you using?

    #1377199
    Carsten

    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' );
    }
    
    #1377201
    Tom
    Lead Developer
    Lead Developer

    That 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!

    #1377208
    Carsten

    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

    #1378269
    Tom
    Lead Developer
    Lead Developer

    I just released alpha.5 which should correct this.

    Thanks!

    #1378291
    Carsten

    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;
    }
    #1378304
    Tom
    Lead Developer
    Lead Developer

    Is 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.

    #1378313
    Carsten

    No, I deleted that, I understood it was not needed anymore.

    I will add the code later, and report back

    #1378427
    Carsten

    I pasted the code snippet in, and the issue is solved.

    Thanks!

    #1378582
    Tom
    Lead Developer
    Lead Developer

    No problem! Thanks for letting us know 🙂

Viewing 12 posts - 16 through 27 (of 27 total)
  • You must be logged in to reply to this topic.