• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Parent in active state in the menu

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Parent in active state in the menu

This topic is: not resolved
  • This topic has 3 replies, 2 voices, and was last updated 12 years, 4 months ago by jazzybazz.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • July 31, 2013 at 9:19 pm #53489
    jazzybazz
    Member

    Hello,

    I am using the Enterprise theme. When I am on a page that appears on the menu, the menu button for the page is in the active state (background color changes)

    However when I go to a page child to the parent, the parent in the menu is not in the active state. I would like it to be in the active state.

    Here's an example of what I'm talking about: http://goo.gl/rpvOBu
    "Expertise" in the menu should be in the active state.

    http://goo.gl/rpvOBu
    July 31, 2013 at 11:17 pm #53504
    Derek
    Member

    This might be what you are looking for. Add this to your style.css:

    #nav li.current-page-ancestor a,
    #nav li li.current-page-ancestor a {
        background: none repeat scroll 0 0 #FFF;
        color: #000;
    }

    Derek Rippe – CSS Artist & Genesis Fanboy @ SynaVista and MediaCairn Design Studio
    Figure out your CSS problems with Firebug | Check out my Custom Comment Form Title plugin

    August 1, 2013 at 5:09 am #53518
    jazzybazz
    Member

    thank you very much Derek. It works good. there is still one more thing I need to fix.

    The code you wrote selects the ancestor in the menu but not the direct parent.

    See for example this page: http://goo.gl/aawVqo

    The path of this page is Services ==> Expertise ==> this page
    ==> means "is the parent of"

    As you can see, the menu label "Services" (the ancestor) is in the active state which is part of what I wanted, but how to make "Expertise" active as well?

    I tried copying and pasting your entire code a second time but with replacing ancestor by parent but it did not work.

    Thank you very much

    August 1, 2013 at 5:32 am #53522
    jazzybazz
    Member

    I did it by copy pasting your code a second time, but replacing #nav by #subnav. Now everything works as expected. Thank you very much for your help.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble