Current page class missing from single post navigation

Hello there,

I am trying to give the main menu an active state when a post is being viewed but there are no classes appearing in the menu to indicate the hierarchy.

On the post listing page, we have the class .current-menu-item, but no equivalent for the single post, such as .current-menu-item-child.

This is the single page: https://leslieh7.sg-host.com/blog/break-it-down-how-hip-hop-exemplifies-the-principles-of-innovation/

How can we target the menu on a single post page?

Kind Regards,

Spencer

Hi Spencer,

Thanks for reaching out.
You need to enable the Active Links > Ancestor to make the Parent Menu activated as you are expecting.

Hope it helps.
Thanks

Hi @tristup,

Thanks for getting back.

That is switched on but the isn’t a class appearing on the list tag. We are not using sub-menus but would still like the top level menu link to be visibly active when a single post is being viewed so we can target it with CSS.

Kind Regards,

Spencer

Hello Spencer,

The “current-menu-item”, “current-parent-menu” or “current-menu-item-child” is only added when the page is actually a submenu of the parent menu. The Blog menu item has no submenus. If you want to highlight the Blog menu item, you will have to modify the menu class. Kindly check out this article instead:

Be advised that this is beyond the scope of our support under our Support Policy. If you are unfamiliar with code and resolving potential conflicts, you may select our One service for further assistance.

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.