It’s good UX when your users know where they are on your website just by looking at the navigation menu and seeing the page label highlighted or active. Better, knowing what main page they’re on while viewing a sub page.
In WordPress, most theme defaults doesn’t highlight the parent page e.g. yourwebsite.com/parent/ when the current page is a child or sub page of it e.g. yourwebsite.com/parent/child/.
As a demo, go to my WordPress Themes page bibiano.io/wordpress/themes/ and notice how the parent page navigation link WordPress bibiano.io/wordpress/ is highlighted.
Here’s the 5-line code snippet I used to solve that issue. Continue reading How to keep parent page navigation link highlighted when viewing a child/sub page