WordPress 3.0 Navigation Menu Styles
as CSS, register_sidebar, settings, widget, WordPress, wp_nav_menu
Let’s jump right in …
Using the default definition from the register_sidebar() function found in ../wp-includes/widgets.php of WordPress version 3.0-alpha 3.0-beta12 (see below):
$defaults = array(
'name' => sprintf(__('Sidebar %d'), $i ),
'id' => "sidebar-$i",
'description' => '',
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => "</li>\n",
'before_title' => '<h2 class="widgettitle">',
'after_title' => "</h2>\n",
);
… and the default Navigation Menu widget, the following CSS style elements are generated:
- #nav-menu-<widget instance>
- .widget
- .widget_nav_menu
- .widgettitle
… with these elements generated specifically by the wp_nav_menu() function found in ../wp-includes/default-widgets.php of WordPress version 3.0-alpha 3.0-beta12:
- .menu-<menu name>-container2
- #menu-<menu name>
- .menu
- #menu-item-<unique identifier*>
.menu-item-type-<types: page, category, Custom>1- .menu-item2
- .menu-item-type-<post_type, custom, or taxonomy>2
- .menu-item-object-<page, or category>2
- .current_page_item
- .sub-menu1
This is just an initial listing of my observations as of the March 16, 2010 3.0-alpha version of WordPress. Look for future updates; and, please feel free to make note of your own observations below.
Bonus – A suggested addition to style.css for theme developers:
/* WordPress 3.0 Navigation Menu default widget */
.widget_nav_menu .menu {margin: 0;}
.widget_nav_menu .menu li {
display: block;
float: none;
/* text-align: left; */
}
- Notes:
- Mar 21, 2010
- menu item type class further defined
- sub-menu class noted
- Apr 15, 2010 (3.0-beta1 updates)
- additional menu classes defined and/or modified
- new menu container class noted
- Share this:
- Share
Calendar Default Widget Broken
as plugin, trac, widget, WordPress
I just happened to notice this today. The calendar default widget that comes with WordPress is having issues. It appears to work fine on the initial visit to a blog’s home page, but if you start reading the archives, especially using the calendar as a navigation tool you may find the calendar using some very oddly structured months.
Here is the trac ticket: http://core.trac.wordpress.org/ticket/11414, so it is being addressed.
In the meantime, I have decided to install the Ajax Calendar plugin as a substitute. There are many other calendar plugins available but this one suits my current needs.
- Share this:
- Share


