You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a Navigation Link or a Navigation Submenu is a non-singular object, the current-menu-item class is missing.
By non-singular I mean archive links such as Categories or Tags.
Step-by-step reproduction instructions
Add a Navigation block with a mix of navigation item links to Posts, Pages, Categories and Tags.
On frontend click the links to visit the "page" of each item, and notice that only Posts and Pages have the current-menu-item class in the item's markup whilst on it's "page".
"page" here refers to the current single post, single page, category archive, or tag archive.
Screenshots, screen recording, code snippet
It seems the Navigation Link and Navigation Submenu blocks are only checking the ID attribute against the current singular ID.
Description
When a Navigation Link or a Navigation Submenu is a non-singular object, the
current-menu-item
class is missing.By non-singular I mean archive links such as Categories or Tags.
Step-by-step reproduction instructions
Add a Navigation block with a mix of navigation item links to Posts, Pages, Categories and Tags.
On frontend click the links to visit the "page" of each item, and notice that only Posts and Pages have the
current-menu-item
class in the item's markup whilst on it's "page"."page" here refers to the current single post, single page, category archive, or tag archive.
Screenshots, screen recording, code snippet
It seems the Navigation Link and Navigation Submenu blocks are only checking the ID attribute against the current singular ID.
This should instead be checking against the queried object ID, similar to the way it is done in the classic nav-menu-template, like so:
Environment info
WP 6.0.1
Gutenberg 13.8.2
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: