[Resolved] Moving secondary mobile menu

Home Forums Support [Resolved] Moving secondary mobile menu

Home Forums Support Moving secondary mobile menu

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #483873
    Gary L

    On my mobile view the secondary menu is at the bottom, it’s appearing as 3 lines with the words Menu next to it. Is it possible to move this to the top under the Main Menu? Just on mobile, nothing else.

    Thanks

    #485235
    Gary L

    Hello?

    #485570
    Leo
    Staff
    Customer Support

    Hi there,

    Sorry for some reason we didn’t get a notification for this topic.

    Link to your site isn’t working. Can you double check?

    #485905
    Gary L

    http://7i54.com is the site. Thanks

    #486109
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Not 100% sure this will work, but try this function:

    add_action( 'wp_footer', 'tu_clone_sidebar_secondary_navigation' );
    function tu_clone_sidebar_secondary_navigation() {
    	?>
    	<script>
    		var target, nav, clone;
    		nav = document.getElementById( 'secondary-navigation' );
    		if ( nav ) {
    			clone = nav.cloneNode( true );
    			clone.className += ' sidebar-nav-mobile';
    			target = document.getElementById( 'site-navigation' );
    			if ( target ) {
    				target.insertAdjacentHTML( 'afterend', clone.outerHTML );
    			}
    		}
    	</script>
    	<?php
    }

    Then add this CSS:

    @media (max-width: 768px) {
        .gen-sidebar-secondary-nav {
            display: none;
        }
    }
    #486538
    Gary L

    Wow that did the trick, they are both at the top!

    this is not that important but the secondary menu is darker or bolded text which is ok, is there a way to name it “menu 2” or something…

    if not or a pain for these that’s fine, it looks great!

    Thanks

    #486597
    Leo
    Staff
    Customer Support
    #486646
    Gary L

    That’s it, Thanks!

    #486655
    Tom
    Lead Developer
    Lead Developer

    Glad we could help! 🙂

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