[Support request] How to stick my mobile secondary menu with primary navigation on mobile

Home Forums Support How to stick my mobile secondary menu with primary navigation on mobile

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1402122
    Kristan

    Hi I’m looking for a solution on how to stick on scroll my secondary menu to the primary menu on mobile. I see that there are existing topics already regarding this but none of those codes worked for me. Thank you!

    #1402394
    David
    Staff
    Customer Support

    Hi there,

    you can try moving the secondary nav inside the Primary Navigation like so:

    1. Create a new Hook Element:
    https://docs.generatepress.com/article/hooks-element-overview/
    Give it a title eg. Nest Secondary Navigation inside Primary
    Add this to the content text area:

    <?php generate_secondary_navigation_position(); ?>

    Select: inside_navigation Hook
    Check Execute PHP
    Set Display Rules tab Location: Entire Site.

    2. Customizer > Layout > Secondary Navigation.
    Set Container: Full Width, Inner Container: Contained, Alignment: Right, Location: No Navigation

    It may require a little CSS to position and probably disable on mobile. Which i can assist with. But this way the two navs are both part of the sticky nav.

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