[wp-trac] [WordPress Trac] #13018: The fallback_cb option of wp_nav_menu is always called

WordPress Trac wp-trac at lists.automattic.com
Fri Apr 16 12:46:01 UTC 2010


#13018: The fallback_cb option of wp_nav_menu is always called
--------------------------+-------------------------------------------------
 Reporter:  Michael       |        Owner:  ryan      
     Type:  defect (bug)  |       Status:  closed    
 Priority:  normal        |    Milestone:  Unassigned
Component:  Menus         |      Version:  3.0       
 Severity:  normal        |   Resolution:  invalid   
 Keywords:                |  
--------------------------+-------------------------------------------------
Changes (by duck_):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 You're using {{{fallback_cb}}} wrong in this case. An example of what you
 want to do is something like:

 {{{
 wp_nav_menu( array(
     'menu' => 'Header Menu',
     'container_class' => 'headermenu',
     'depth' => 3,
     'menu_class' => 'headermenu',
     'show_home' => false
 ) );
 }}}

 if no menu is found then the array of arguments is passed onto the
 fallback callback.

 To get children in the menu drag a menu item onto the item you want to its
 parent (though this may change).

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13018#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list