WordPress 3.0 Menu class and id issues
-
I am trying to integrate the dynamic menu into my theme in progress. I have this code in the header to load the menu:
<?php wp_nav_menu(array('theme_location' => 'primary', 'container_id' => 'navigation')); ?>which generates html with a container div with the standard menu class, but no container id even though I added it to the array:
<div class="menu"><ul><li class="page_item page-item-439"> <--------- cut -------------> </li></ul></div>NB in my theme’s functions.php I have:
//add dynamic menu add_action( 'init', 'register_my_menus' ); function register_my_menus() { register_nav_menus( array( 'primary-menu' => __( 'Primary Menu' ), 'secondary-menu' => __( 'Secondary Menu' ), 'tertiary-menu' => __( 'Tertiary Menu' ) ) ); }And I created a menu called primary with all my pages in the backend.
Why can’t I add the div container id I want? How can I add an id to the ul?
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
The topic ‘WordPress 3.0 Menu class and id issues’ is closed to new replies.