[wp-trac] [WordPress Trac] #14027: Inconsistent menu markup makes styling very difficult
WordPress Trac
wp-trac at lists.automattic.com
Mon Jun 21 16:52:56 UTC 2010
#14027: Inconsistent menu markup makes styling very difficult
-------------------------------+--------------------------------------------
Reporter: Denis-de-Bernardy | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Menus | Version: 3.0
Severity: normal | Keywords:
-------------------------------+--------------------------------------------
When inserting a menu like so:
{{{
<?php wp_nav_menu(array(
'theme_location' => 'header',
'container_class' => 'header-menu',
'container_id' => 'header-menu',
'depth' => 1,
)); ?>
}}}
The result markup looks like this:
{{{
<div id="header-menu" class="header-menu"><ul id="menu-header-nav-menu"
class="menu"><li id="menu-item-66" class="menu-item menu-item-type-
post_type">...
}}}
Unless the menu is empty/undefined... In this case, you get the following:
{{{
<div class="menu"><ul><li class="page_item page-item-60
current_page_parent">...
}}}
This makes menu styling overly complicated...
In addition, the container parameter gets ignored if an empty string is
entered. So there is no means to get rid of the useless div.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14027>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list