adding support for Custom menu(introduced in 3.0) to older theme
-
Okay so I followed each step as in http://codex.wordpress.org/Navigation_Menus
Registered the menu in theme as ‘primary’ in functions.php
<?php function register_my_menus() { register_nav_menus( array('header-menu' => __( 'primary' ) ) ); } add_action( 'init', 'register_my_menus' );
and added the following code at the header.php where I want my custom menu to be displayed
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'container' => '' ) ); ?>
However I am unable to output the custom menu items , seems like it displaying out menu in new div id , which is not required and is supposed to disabled using the ‘container’=> ” but still ads a div code ?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘adding support for Custom menu(introduced in 3.0) to older theme’ is closed to new replies.