Possible to add secondary menu to fixed menu?

This topic has 4 replies, 2 voices, and was last updated 6 years, 10 months ago ago by Rose Tyler

  • Avatar: BWA2
    BWA2
    Participant
    January 13, 2018 at 11:46

    Hi there,

    Is it possible to add the secondary menu to the fixed menu? At the moment the secondary menu only shows at the main menu but it’s not in the fixed menu when scrolling down: http://food.bangkokwebagency.co.th/new-arrivals/

    Thank you.

    3 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 15, 2018 at 08:50

    Hello,

    Thanks for the topic.
    We don’t have the option to show secondary menu in the fixed header, and this requests additional customization in js, php files and css, which is beyond our basic support scope. We can give only tips.
    To include JS you need to create etheme-child.js file in your child theme, then add this code –

    jQuery(document).ready(function($) {
    		if ( $( 'body' ).hasClass( 'et-fixed-disable' ) ) return;
    	    if ( $( 'body' ).hasClass( 'et-vertical-fixed' ) && $(window).width() > 992 ) return;
    
    	    var header = $('.header-wrapper'),
    	    	secondaryMenu = header.find('.secondary-menu-wrapper').html();
    	    $('.fixed-header .menu-wrapper').before('<div class="secondary-menu-wrapper">'+secondaryMenu+'</div>');
    });

    Also, use this code in function.php file of your child theme https://prnt.sc/gfb65z:
    wp_enqueue_script('child-theme', get_stylesheet_directory_uri().'/etheme-child.js',array('etheme'),false,true);
    +
    add this code in Theme Options > Styling > Custom css:

    .fixed-header .secondary-menu-wrapper {
        display: block;
    }

    Regards

    Avatar: BWA2
    BWA2
    Participant
    January 19, 2018 at 10:08

    Thank you – this worked like a charm!

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 19, 2018 at 10:14

    You’re welcome!
    Have a nice day.

    Regards

  • Viewing 4 results - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.