Okay
  Public Ticket #369533
Menu Active State
Closed

Comments

  • kyle started the conversation

    I am having an issue getting the parent Side Menu to show an active state if I'm on a sub-page within that parent. For example, my Team page shows an active yellow color on the side menu but goes back to white when I click on a particular team member page. The same happens for my blog. It shows active in the archive/list view but goes back to white when I view an actual post. How do I keep this active when on a child page?

  •  295
    Paul replied

    Hi there!

    For both team member and blog post, since they are the "single post" of WordPress, WordPress actually do not know which menu is their parent unless you also put them into the menu.

    For example, if your menu structure is like this:

    Home
    Team
    About
    Contact

    If you click on "Team" to open the team page then click on any member in there to see his/her single post, WordPress will not know what is the root menu parent it is clicked from.

    You need to create the menu like this:

    Home
    Team
    - John Doe
    - Jane Doe
    - Paul Smith
    About
    Contact

    And if the viewing single post is "John Doe", then the Team menu is highlighted as active.

    Regards,
    Paul

  • kyle replied

    I see. Is there any way to specify all children in the menu automatically instead of having to manually drop each one in? I don't want my team members to manually have to add their blog post to the menu every time they create a new post.

  •  295
    Paul replied

    Hmm, I am also not quite sure about that. Maybe some plugins out there could do that. You can try google with the keywords like "wordpress menu auto add".