Adding a secondary menu to my theme
-
There’s a lot to read about secondary menus in WP, however it looks like the tricks are for older WP version.
I see that WP 4.5 supports multiple menus in the dashboard, but it doesn’t show a location where to insert the menu.
Do we still need the following code in the header?<?php wp_nav_menu( array( 'theme_location' => 'secondary-menu', 'menu_class' => 'topper', 'fallback_cb' => '') ); ?>
Moreover, Do i need to place this code in functions.php?
add_action( 'init', 'my_custom_menus' ); function my_custom_menus() { register_nav_menus( array( 'primary-menu' => __( 'Primary Menu' ), 'secondary-menu' => __( 'Secondary Menu' ) ) ); }
Last question is: will the secondary menu be automatically visible in the mobile menu version?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Adding a secondary menu to my theme’ is closed to new replies.