This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Current Page for 2 or more levels

Resolved 6 replies premiumthemetheme-vantage
10 years ago · Last reply by Andrew Misplon 10 years ago

Hi, this code displays only for one level up.

/* Vantage Current Menu Item Colors */
.main-navigation ul li.current-menu-item > a, .main-navigation ul li.current_page_parent > a {
  color: #47ff14;
}

I would like to know how to write for an extra menu level?

URL: http://onlinecores.com

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

6
  1. Andrew Misplon Staff 10 years, 6 months ago

    Hi Mikael

    Have you tried setting current menu colors from the Customizer > Theme Design > Menu, everything should be working properly there.

  2. Internetbutiken Sweden 10 years, 6 months ago

    Yes, I’ll try it.
    But that controls only the current page. I search for css to highlighting the parent pages too.

  3. Andrew Misplon Staff 10 years, 6 months ago

    Sure. Here we go. Adjust as required.

    /* Vantage Current Menu Item Colors */
    .main-navigation ul li.current-menu-item > a, .main-navigation ul li.current_page_item > a, .main-navigation ul li.current-menu-parent > a { background-color: #000000 }
    .main-navigation ul li.current-menu-item > a, .main-navigation ul li.current-menu-item > a, .main-navigation ul li.current-menu-parent > a [class^="icon-"],
    .main-navigation ul li.current_page_item > a, .main-navigation ul li.current_page_item > a, .main-navigation ul li.current-menu-parent > a [class^="icon-"] { color: #ffffff }

    Hope that helps :)

  4. Andrew Misplon Staff 10 years, 6 months ago

    Well since we already have the Customizer handling the regular current items we can just add this:

    .main-navigation ul li.current-menu-parent > a { background-color: #000000 }
    .main-navigation ul li.current-menu-parent > a [class^="icon-"],
    .main-navigation ul li.current-menu-parent > a [class^="icon-"] { color: #ffffff }

    No sense in doubling up.

  5. Internetbutiken Sweden 10 years, 6 months ago

    I found out this is working as I wanted it to.

    /* Vantage Current Menu Item Colors */
    .main-navigation ul li.current_page_ancestor > a{
      color: #47ff14;
    }

    Do you have any donate button for the gratitude?

  6. Andrew Misplon Staff 10 years, 6 months ago

    Awesome, really glad to hear that helped.

    Thanks so much for your generous offer. Your support is more than enough :)

    All the best with your site.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread