WordPress.org

Ready to get started?Download WordPress

Forums

how to make subpages trigger menu item as current? (3 posts)

  1. forgetcolor
    Member
    Posted 3 years ago #

    Using the new menu system in 3.0 with TwentyTen.

    I want to make it so that Pages that are subpages of a parent page show the parent page's menu item as current when on the subpage. For example, if the parent Page is:

    http://domain.com/projects

    and there's a menu item called 'projects' associated with it, then when a visitor is on a page like:

    http://domain.com/projects/subproject

    that it still leaves the 'projects' menu item lit up as current.

    any way to do this?

  2. forgetcolor
    Member
    Posted 3 years ago #

    I'm now thinking this is better placed in the Themes forum. Can someone move it for me?

  3. Leia Scofield
    Member
    Posted 3 years ago #

    In your CSS, have the style you apply to the page when it is current also apply to a class of "current-page-ancestor".

    Example CSS:
    li.current_page_item a, li.current-page-ancestor a { font-weight:bold; }

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags