WordPress.org

Make WordPress Core

Opened 19 months ago

Closed 19 months ago

Last modified 19 months ago

#46787 closed defect (bug) (duplicate)

Viewing single blog posts does not add class current_page_parent in navigation. Other issues with CPT.

Reported by: leec87 Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.1
Component: Menus Keywords:
Focuses: Cc:

Description

The main issue I'm reporting is that when adding a menu navigation item of a Page that is set to be the page for blog posts, when viewing that page the menu item is corrected hightlighted as active.

However, when viewing single blog posts, the menu item should have the current_page_parent class added to it, but it does not. The parent 'Blog' menu item (as titled in my case) should be hightlighted whenever single blog posts are being viewed, not just the index page.

Similarlialy, I have created a custom post type and have an archive page, which also has a menu item. When viewing the archive page of this CPT, the menu item has current-menu-item added to it, but when viewing a post inside this, the current_page_parent class should be added to this menu item, but it isn't, leaving no highlighted menu item in the navigation.

This was reported years ago, but was marked as fixed, with no real fix for the issue, so I'm re-opening it. There are countless comments and posts online regarding this issue that has always been around. I can only gather it must be difficult to fix, but either way, it still is yet to be resolved.

Change History (2)

#1 @leec87
19 months ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #38486.

#2 @swissspidy
19 months ago

  • Milestone Awaiting Review deleted
  • Severity changed from major to normal
Note: See TracTickets for help on using tickets.