Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #82514
    marcodimi
    Participant

    how can I get my menu that slides down without using plugins? I saw that there are issues that allow this, there is a code that you enter to set the menu to the screen? thank you

    #82526
    Pratik
    Participant

    Hi @marcodimi,
    By menus to slide down, do you mean sub-menus? If so, in WordPress admin, you can control the menu by going to the Menu under Appearance tab. To make a drop down menu, you just drag and drop the items under another item. You need to drop it as a child element(just drag and drop it).

    If you want anything else, you will either need to hire a customizer or add it via plugin as this goes beyond the theme support scope.
    Regards,
    Pratik

    #82530
    marcodimi
    Participant

    No, I want to follow the menu scrolling down the page, as I have now, but no plugin because I do not want to load the site, I saw that other issues have this nice feature

    #82569
    Pratik
    Participant

    hi @marcodimi,

    Sorry I misunderstood early. I think what you mean is to fix the primary menu.

    This is a bit complex but it can be done following following steps:
    1. Add following CSS code in Appearance=> Theme Options=> Custom CSS Styles

    
    #access.fixed {
        position: fixed;
        top: 0;
        width: 1000px !important;
    }
    

    2. Then add following jQuery code in Appearance=> Theme Options=> Webmaster Tools=> Header and Footer Codes=> Code to display on Footer:

    
    <script>
    jQuery(window).scroll(function () {
    	if (jQuery(this).scrollTop() > 100) {
    		jQuery('#access').addClass('fixed');
    	} else {
    		jQuery('#access').removeClass('fixed');
    	}
    });
    </script>
    

    This will fix the menu whenever user scrolls below the primary menu.

    If you always want the Primary Menu fixed, you can just add following code to Appearance=> Theme Options=> Custom CSS Styles and it will always be fixed to top.

    
    #access {
        position: fixed;
        top: 0;
        width: 1000px !important;
    }
    
    #branding {
        margin-top: 44px;
    }
    

    Let me know how things workout.

    Regards,
    Pratik

    #82584
    marcodimi
    Participant

    it’s ok! thankyou

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘fix the on-screen menu’ is closed to new replies.