[Resolved] Using 2nd navigation in left sidebar issue

Home Forums Support [Resolved] Using 2nd navigation in left sidebar issue

Home Forums Support Using 2nd navigation in left sidebar issue

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1168793
    NIKOLAY

    Hi,

    I’m using 2 navigation menus in my web. 1st one is located under header and 2nd one is in left sidebar. (My web is using sidebar/content/sidebar).

    Is it possible in mobile version instead of showing 2nd navigation under content to be display under main navigation before the content?

    Best regards: Nick

    #1168845
    David
    Staff
    Customer Support

    Hi there,

    can you link me to your site so i can take a look?

    The alternative would be to use the Off Canvas Panel for mobile where you could combine the two menus:

    https://docs.generatepress.com/article/off-canvas-panel-overview/

    Then it would require a little CSS to remove the Secondary nav …. let me know.

    #1168853
    NIKOLAY

    it is http://elhovobg.org.

    It is on Cyrillic, hope that is not big problem.

    Regards

    #1168951
    David
    Staff
    Customer Support

    Lets try this.
    Add the following code to the after_header hook:

    <div class="second-nav-mobile hide-on-desktop grid-container">
    	<?php 
    	if ( function_exists( 'generate_secondary_navigation_position' ) ) {
    		generate_secondary_navigation_position();
    	}
    	?>	
    </div>

    You can use a Hook Element to do that:

    https://docs.generatepress.com/article/hooks-element-overview/

    #1168957
    NIKOLAY

    Works perfectly!

    The only difference is that I did not use after_header hook. I use inside_side_container.

    Thank you!!!

    #1168968
    David
    Staff
    Customer Support

    Awesome! Glad to hear that 🙂

    #1168969
    NIKOLAY

    Just one final question.

    Any idea how to change 2nd menu to be floating left (same as above navigation) – now is on centre?

    Thank you!

    #1168979
    David
    Staff
    Customer Support

    Try this CSS:

    .secondary-navigation .menu-toggle {
        text-align: left;
    }
    #1168999
    NIKOLAY

    Works perfect!

    After doing new hook for 2nd menu and adding css, now bellow under the content the 2nd navigation bar did not work on mobile version anymore.

    Can I just remove in mobile version not to display 2nd navigation located in left sidebar?

    Thanks!

    #1169005
    David
    Staff
    Customer Support

    Try this:

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

    Wow!!!

    I have no words to describe how great you are!

    This is the best online support ever!

    Many Thanks for all your help.

    Regards: Nick

    #1169009
    David
    Staff
    Customer Support

    happy to hear that !

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