[wp-trac] [WordPress Trac] #14844: wp_nav_menu producing unexpected results

WordPress Trac wp-trac at lists.automattic.com
Mon Sep 13 04:02:52 UTC 2010

#14844: wp_nav_menu producing unexpected results
 Reporter:  holypixel     |       Owner:                         
     Type:  defect (bug)  |      Status:  new                    
 Priority:  normal        |   Milestone:  Awaiting Review        
Component:  Menus         |     Version:  3.0.1                  
 Severity:  normal        |    Keywords:  reporter-feedback close

Comment(by holypixel):

 Yea thats correct, I mean when a user clicks one of the Item D menu

 I realise that they all link to the item D page, however the links
 themselves are uniquely identified by the menu-item-id. It is using the
 menu-item-id as opposed to the target page or url that I propose using as
 the identifier.

 For example, the menu link could contain the menu-item-id, so that when
 clicked wordpress could create the variable containing that ID, as I
 proposed in the previous message.

 Your example of current-menu-ancestor is good in theory, however if that
 is the way it is supposed to work, then it is broken. In all of my tests
 multiple instance children under different parents will create the
 current-menu-ancestor class on the parents, just the same as the current-
 menu-item. I presume this is because current-menu-ancestor is determined
 by current-menu-item, and if current-menu-item doesn't differentiate, then
 would why ancestor?

 Please see http://www.apersonaldogtrainer.com.au as my example. You will
 notice that 'pricing' appears under training, boarding, grooming and about
 me. If pricing is the current page, then training, boarding, grooming and
 about me all have the current-menu-ancestor class applied, in addition to
 current-menu-parent. That doesn't appear to mesh with your comments on how
 it is supposed to work.

 It is either broken or I am seriously not understanding something.
 Throughout our discussion you have said that wordpress cannot
 differentiate between the menu items if they are multiple instances due to
 the fact that their target's are the same. If that is the case, then why
 even bother having the current-menu-item, current-menu-parent or current-
 menu-ancestor classes, if all they do is mirror the curren-page style of

Ticket URL: <http://core.trac.wordpress.org/ticket/14844#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list