This topic has 4 replies, 2 voices, and was last updated 6 years, 10 months ago ago by Rose Tyler
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.
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
Thank you – this worked like a charm!
You’re welcome!
Have a nice day.
Regards
You must be logged in to reply to this topic.Log in/Sign up