When WordPress 3.0 came out, it introduced the new menu system. You can read more about it HERE if you haven’t had a chance to play around with it. Customizing your menu is a whole lot easier using the new admin interface, but certain elements can’t really be added, such as a search bar. Unless of course, you hook into the wp_nav_menu_items filter.

Here is a great code snippet I found on WP Recipes that will allow you to add a search bar to your nav menu:

add_filter( 'wp_nav_menu_items','add_search_box', 10, 2 );
function add_search_box( $items, $args ) {
    $items .= '<li>' . get_search_form( false ) . '</li>';
    return $items;
}

Add that to your functions.php file and make sure that your custom menu has been saved and added to your site and a search bar will now appear in your menu.

I also had some of my theme users request some code to add a date to the menu bar. That can easily be accomplished by adding the following code to your functions.php file:

add_filter( 'wp_nav_menu_items','add_date', 10, 2 );
function add_date( $items, $args ) {
    $items .= '<li class="navdate">' . date( 'l F jS, Y' ) . '</li>';
    return $items;
}

I used this CSS to make the date float to the right with a padding of 10px and white text:

.navdate { 
	color: #fff; 
	float: right !important;
	border: 0 !important;
	padding: 10px;
	}

Some of my themes have multiple menus, so you can even specify that you only want to add something to one specific menu by adding some arguments:

add_filter( 'wp_nav_menu_items','add_date', 10, 2 );
function add_date( $items, $args ) {
    if ( 'main' == $args->theme_location )
        $items .= '<li class="navdate">' . date( 'l F jS, Y' ) . '</li>';

    return $items;
}

Now the date will only be displayed in the menu theme location named “main”.

This code can be modified to add any item you want to your nav menu that isn’t easily added through the admin interface.