Dropdown menu

Hello,

I added a second menu location on the header :

Everything seems to work, except the CSS for the submenu item (it’s displayed not in dropdown). How to have the same CSS as on the Sparkling theme ?

Thank you

That’s what it looks like for the moment (Sorry no direct link, i’m working on local) :

Hey there

Alex basically you are adding a new feature in the theme and this will require major changes :slight_smile:
such things are not supported but let’s try, however, i can’t guarantee anything,
please give me a url of the page

Hello Noda,

After hours of headhache, I found how to do this :


function register_menu_des_categories() {
  register_nav_menu('main-categories',__( 'Menu sous le logo' ));
}
add_action( 'init', 'register_menu_des_categories' );

function tp1p_categories_menu() {
	wp_nav_menu(
		array(
			'menu'            => 'main-categories',
			'theme_location'  => 'main-categories',
			'container'       => 'div',
			'container_class' => 'collapse navbar-collapse navbar-ex1-collapse',
			'menu_class'      => 'nav navbar-nav',
			'fallback_cb'     => 'WP_Bootstrap_Navwalker::fallback',
			'walker'          => new WP_Bootstrap_Navwalker(),
		)
	);
}

With some CSS adjustements :slight_smile:

It’s now resolved, thank you.

Thank you for sharing this information :slight_smile: