[wp-testers] Menu class for container.

Philip M. Hofer (Frumph) philip at frumph.net
Thu May 13 09:38:08 UTC 2010

Right now the menu container and design is controlled by twentyten with:

<div id="access" role="navigation">
<?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'container_class' 
=> 'menu-header' ) ); ?>
</div><!-- #access -->

The widget however, does not contain a static class as a container, except 
for the Ul part:

<div class="menu-fmenu-container">
        <ul id="menu-fmenu" class="menu">

However, the extra <div id="access" role="navigation"> is not avialable as a 
static with the widget.

Adding to the container wrap (replacing access for menu-container as a 

<div class="menu-fmenu-container menu-container" role="navigation">

This will allow the Navigation Menu widget allow users to create a static 
CSS for their themes and allow end users to create their own navigation CSS 
for it.

Now, imagine a theme that has an above header below header below blog widget 
area.   Keeping a static <div> in those locations with certain browsers 
(*cough* IE)  and if those are empty div's are empty the dom adds to the 
draw time as well as if not styled right creates an empty space in that area 
for IE6-7

To make it easier for people to make custom menus to just drop into 
sidebar's for custom themes it would behoove us to use the classes that get 
generated from within the widget itself hence adding a static would be 
required.  The container being dynamic with the menu name will not cut it 

End users will then be able to use the menu UI create their menus with 
whatever name but still have the themes design when dropping it into one of 
the sidebars where they would want to have it.

I'm kind of dreading having to create options in my theme options to write 
"put menubar here" [x] header [x]above header [x] below header, etc.  And 
having the container itself hardcoded like done on the twentyten.

- Phil

More information about the wp-testers mailing list