Secondary Menu Doesn't Show for Unite WordPress theme

Hello,

I tried to add secondary menu functionality in the functions.php of Unite theme:

// This theme uses wp_nav_menu() in one location.
	register_nav_menus( array(
		'primary' => __( 'Primary Menu', 'unite' ),
                'secondary' => __( 'Secondary Menu', 'unite' ),
		'footer-links' => __( 'Footer Links', 'unite' ) // secondary nav in footer
	) );

and I created child theme and I have this file: header-2.php in it, since I need different header picture and different menu nav. So to display this secondary menu I added:

<?php
		            wp_nav_menu( array(
		                'theme_location'    => 'secondary',
		                'depth'             => 2,
		                '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())
		            );
		        ?>

I have created the menu set for this secondary menu in WordPress Dashboard, but somehow it is still showing the primary menu.

I wonder if I should add this header-2.php file inside the Unite theme folder instead of my child theme folder?

Any idea of how to solve this problem?

Thank you!
~ A u d e e

Hello,

I found out that I should add the header-2.php file to Unite theme folder and all work perfectly! :slight_smile:

Thanks for the great theme!

~ A u d e e

Hi Audee,

Awesome great to see you got that worked.

Please advise if you have more questions.

Have a fantastic day!

Cheers,
Movin