child theme (part I)

Dear bb team

I created different bb-child-themes with all different template presets. If I switch to such a child theme I always loos the menu in the header and I need to go to: Design --> Menu --> set the menu to the header position. Is there a way i can set the menu in the header from default (within the child themes function.php)?

Thanks for helping
Dominic

Hey Dominic,

I’ve already assigned another member of the team who can assist you further.

Ben

Thanks, Ben

-Dominic

Hey Dominic,

I did test out a few things regarding this and you can set the menu by overriding the specific header layout you have(nav-right, nav-bottom, or nav-centered). You can just include that in your child theme under the same folder /includes/ then edit this part, adding ‘menu’ to the array.

wp_nav_menu(array(
  'theme_location' => 'header',
  'menu' => 'menu name',
  'items_wrap' => '<ul id="%1$s" class="nav navbar-nav navbar-right %2$s">%3$s</ul>',
  'container' => false,
  'fallback_cb' => 'FLTheme::nav_menu_fallback'
));

Hope this helps!

Ben