Opened 15 years ago
Closed 15 years ago
#13409 closed defect (bug) (fixed)
wp_nav_menu current-menu-item incorrect
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 3.0 | Priority: | normal |
| Severity: | normal | Version: | 3.0 |
| Component: | Menus | Keywords: | has-patch needs-testing |
| Focuses: | Cc: |
Description
When a page ID is the same as a category ID, and both the page and category are placed in a menu, both items will be given current-menu-item which is incorrect.
Issue exists in beta 1/2.
Attachments (1)
Change History (5)
#2
@
15 years ago
We could probably just do ( $item->type == 'post_type' && $wp_query->is_singular ) || $item->type == 'taxonomy' && ! $wp_query->is_singular ). Haven't looked at the code yet but if we need to use $wp_query then that'd be easiest and should be good.
Note: See
TracTickets for help on using
tickets.
Couldn't find a function to help make this nicer, maybe someone else knows of one... anyway gives the idea of the fix.