I’m building a site for a client where there are, essentially, two post pages – a blog and a “case studies” page. I want the data entry points for those two sections to be separate, so I created a custom post type “case-study” and a pair of templates – “case-study.php” and “single-case-study.php”. I use a WP_query in case-study.php to list all case studies and it’s all working great. Except for one thing.
I’m displaying the main nav for the site using wp_nav_menu(), and I notice that, when viewing an individual case study, the “current-page-parent” class is applied to “blog” rather than “case studies”. How do I go around this?