• I’ve got dynamic menus working using css/is_page for posts and all parent pages.

    Now, how do I keep a ‘parent’ page highlighted when I’m inside a child page for that parent – similar to how this site works.

    I read the doc on Dynamic Menu Highlighting and it’s not clear to me how to do this.

    here’s the expression I’m using:

    <?php if (is_page()) { $highlight = “page_item”; } else {$highlight = “page_item current_page_item”; } ?>

    For my child pages, this allows highlighting on the child page only. I want to highlight the child page AND the parent page at the same time.

    I’ve thought through some rather clumsy and complex ways to do this. I’m hoping there’s an easy way.

  • The topic ‘Dynamic Menus – highlight parent page’ is closed to new replies.