Open up your theme folder and locate the functions.php file. Search for a function called register_nav_menu (used in TwentyEleven theme) or register_gpp_menus (used in most GPP themes). It looks like this in many of our themes:
function register_gpp_menus() { register_nav_menus( array( 'main-menu' => __( 'Main Menu' ) ) ); }
We are going to add another item to the array, called Second Menu, like this:
function register_gpp_menus() { register_nav_menus( array( 'main-menu' => __( 'Main Menu' ), 'second-menu' => __( 'Second Menu' ) ) ); }
Now that we have registered a new nav menu item, you should see the Second Menu on your Theme – Menus page in your WordPress admin panel. Add menu items to it and save the menu. Now we need to display the menu somewhere in your theme. You can either add this to your theme files:
<?php wp_nav_menu( 'sort_column=menu_order&menu_class=sf-menu&theme_location=second-menu' ); ?>
Or, you can add the menu to a Widget using your Theme – Widgets panel in your WordPress admin panel. If you want to style your menu differently, you can add a different menu class to the wp_nav_menu() function above: menu_class=second-menu And then add some css to your custom CSS panel to help style that menu. This is not mandatory, though.
Leave a Reply