[wp-trac] [WordPress Trac] #13597: Using the same menu in multiple theme_location resulting in duplicate ids
WordPress Trac
wp-trac at lists.automattic.com
Fri May 28 15:09:30 UTC 2010
#13597: Using the same menu in multiple theme_location resulting in duplicate ids
--------------------------+-------------------------------------------------
Reporter: sushicodeur | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Menus | Version: 3.0
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
I've a site using multiple menus. The menu are registered this way
{{{
if ( function_exists('register_nav_menus') ) {
register_nav_menus(
array(
'social-top' => 'Top social menu',
'social-bottom' => 'Bottom social menu',
)
);
}
}}}
I wish to use the same menu (named social) for the two theme locations. I
call the menu with these args :
{{{
<?php
$menu_args = array(
'container' => '',
'theme_location' => 'social-top', // and social-bottom the next time
);
wp_nav_menu($menu_args);
?>
}}}
Resulting in the same opening tag for the two menus (since the id is
constructed using the menu slug), which is not W3C valid :
{{{
<ul id="menu-social"><!-- found twice in the same page -->
}}}
The "container_id" option described here
http://codex.wordpress.org/Function_Reference/wp_nav_menu seems to have no
effect.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13597>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list