Reputation: 1338
I'm having an issue working with wp_nav_menu, I'm trying to create my own Theme for WP, now i've putted that code into my functions.php file,
function register_my_menu() {
register_nav_menu('header-menu',__( 'Header Menu' ));
}
add_action( 'init', 'register_my_menu' );
as the guide said, and now when I'm trying to combine it into my design, the paramters I pass in the wp_nav_menu function doesn't really do anything, and I dont really understand why, I tried to play with it but it doesnt seem like something gets changed. `
wp_nav_menu( array( 'items_wrap' => '<ul id="danny" class="danny">%3$s</ul>','theme_location' => 'header-menu' ) );
` it doesnt metter what I do, what I add as a paramter the output stays as it is, anyone has anyidea? am I missing something?
thanks!
Upvotes: 3
Views: 4787
Reputation: 6359
Why not instead of registering your menu, you just use 'menu' parameter like this:
wp_nav_menu( array( 'items_wrap' => '<ul class="%2$s danny" id="danny">%3$s</ul>','menu' => 'header-menu' ) );
Upvotes: 2
Reputation: 853
Take another peek at the Codex: http://codex.wordpress.org/Function_Reference/wp_nav_menu
Instead of passing that markup try the parameters for menu_class and menu_id. for example:
<?php wp_nav_menu( array( 'theme_location' => 'header-menu', 'menu_class' => 'danny', 'menu_id' => 'danny' ) ); ?>
Upvotes: 0