WordPress.org

Make WordPress Core

Opened 8 years ago

Last modified 4 months ago

#20325 new defect (bug)

Menu item parent classes for page_for_posts (home.php) not properly set on single.php

Reported by: ptietz Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Menus Keywords: needs-patch
Focuses: Cc:
PR Number:

Description

If one has set page_for_posts (Settings => Read), on single.php wp_nav_menu() will set current_page_parent for the accordant menu item, but it will not set any parent or ancestor classes for its parent menu items as expected. [tested with 3.3.1]

Change History (4)

#1 @ptietz
8 years ago

  • Cc ptietz@… added

#2 @drumba
6 years ago

Same time the home menu entry gets the current-menu-item class.

#3 @schlimpf
5 years ago

Any updates on this?
I am experiencing the same error. Is this behavior intended?
The same error occurs when being in a category

As far as I can tell, the error does not occur with custom post types.

Last edited 5 years ago by schlimpf (previous) (diff)

#4 @chriscct7
4 years ago

The problem seems to be in _wp_menu_item_classes_by_context

Note: See TracTickets for help on using tickets.