Opened 14 years ago
Closed 11 years ago
#16382 closed defect (bug) (wontfix)
Menus adds "current_page_parent" class to the blog page when viewing a custom post type entry
Reported by: | tammyhart | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0.5 |
Component: | Menus | Keywords: | dev-feedback close |
Focuses: | Cc: |
Description
Here is an example: http://www.flowermag.com/article/love-rocks/
This entry is in the custom post type "article", but the navigation item "blog" is getting the class "current_page_parent" even though an article is not a blog post.
This is a problem since if you're using "current_page_parent" for navigation highlighting, this would render an incorrect display.
Change History (6)
Note: See
TracTickets for help on using
tickets.
current_page_parent
is meant to make the menus work in a backwards-compatible way with the classes given to pages in lists, thanks toWalker_Page
.Specifically,
Walker_Page
, which generates the class names for many page lists, considers everything not a page to be a child of the "posts page." Maybe it shouldn't, but that's the behavior that would need to be changed first.Instead, you can use the "
current-menu-parent
" class to specify elements that are parents of the currently-requested page, without this backwards-compatibility quirk.