• Hello,
    I created a site with a blog and want a menu item “blog”, added custom permalink structure with the slug “blog” (/blog/%postname%/). Now I’d like the menu item “blog” to be highlighted when any blog article is open. Since the posts are not real children of the parent “blog” page, the <li> tag does not get the .current-menu-item class. How to go about this?

    • This topic was modified 5 years, 3 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 1 replies (of 1 total)
  • I don’t know if I understand you correctly, but if you assigned Blog posts page under Settings -> Reading, then <li> tag will have .current_page_parent class applied. Would this help you?

Viewing 1 replies (of 1 total)
  • The topic ‘Highlight parent menu item when open post with custom permalink’ is closed to new replies.