Opened 16 years ago
Closed 13 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: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Menus | Version: | 3.0.5 |
| Severity: | normal | Keywords: | dev-feedback close |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
current_page_parentis 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.