Title: Highlight active parent item?
Last modified: August 30, 2016

---

# Highlight active parent item?

 *  Resolved [direwolfy](https://wordpress.org/support/users/direwolfy/)
 * (@direwolfy)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/highlight-active-parent-item/)
 * Is there a way to add the color to the *parent* item, in addition to the active
   item (page that is currently open)?
 * I can edit the CSS so that all opened parent items are highlighted, but this 
   is not ideal. I’d like to highlight only the parent item (level 1) + active item(
   level 2).
 * Thank you!
 * [https://wordpress.org/plugins/nextend-accordion-menu/](https://wordpress.org/plugins/nextend-accordion-menu/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Gabor](https://wordpress.org/support/users/nextendweb_gabor/)
 * (@nextendweb_gabor)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/highlight-active-parent-item/#post-6739895)
 * Hi! You can edit how the active item should look like at the different levels
   in the Theme: Default – Configure:
    [http://www.nextendweb.com/wiki/accordion-menu-documentation/default-theme/](http://www.nextendweb.com/wiki/accordion-menu-documentation/default-theme/)
   This theme you can only change the font, so that is where you should go. But 
   if you have the full version, in the other themes you can also give different
   background colors.
 *  Thread Starter [direwolfy](https://wordpress.org/support/users/direwolfy/)
 * (@direwolfy)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/highlight-active-parent-item/#post-6739982)
 * Thanks! I can edit the active item colors in the Theme, but that still means 
   that *all* open parent items are that active color. However, I’d like to change
   only the color of the parent item of the page that is currently open.
 * For example, if I am on a page about Apples:
 * – Fruit (Active Color)
    — Apples (Active Color) — Strawberries – Vegetables —
   Carrots — Potatoes
 * Even though the Vegetables menu is open, it should be the same color as all the
   non-active links. However, with the current setup, Vegetables *and* Fruit are
   the active color.
 * Hope that makes sense. Thank you!
 *  Plugin Author [Gabor](https://wordpress.org/support/users/nextendweb_gabor/)
 * (@nextendweb_gabor)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/highlight-active-parent-item/#post-6739989)
 * This theme was made this way, so if you want to have different colors for the
   active and opened elements, you need to change the css file. You can find it 
   here:
    wp-content\plugins\nextend-accordion-menu\themes\default\default\style.
   less
 * less files are the same as css files, they just can use variables too, so you
   could simply modify the css codes.
 * If you open up that file, you can see this around line 109.:
 *     ```
       &.opening,
                       &.opened,
                       &.active{
                           span.inner span,
                           a{
                               &,
                               span{
                                   d: e(~"@{level@{index}font-active}");
                               }
                           }
                       }
       ```
   
 * You should remove the active and put it under it with your code:
 *     ```
       &.opening,
                       &.opened{
                           span.inner span,
                           a{
                               &,
                               span{
                                   d: e(~"@{level@{index}font-active}");
                               }
                           }
                       }
   
                       &.active{
                           span.inner span,
                           a{
                               &,
                               span{
                                   color:red;
                               }
                           }
                       }
       ```
   
 *  Thread Starter [direwolfy](https://wordpress.org/support/users/direwolfy/)
 * (@direwolfy)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/highlight-active-parent-item/#post-6740035)
 * Thank you! Unfortunately this still only changes the color for the active item,
   not the active parent. Is there no way to assign “active” status to the parent
   item of the active item as well?
 *  Plugin Author [Gabor](https://wordpress.org/support/users/nextendweb_gabor/)
 * (@nextendweb_gabor)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/highlight-active-parent-item/#post-6740043)
 * I’m sorry, but no, our system only gives “active” class the active element, because
   it’s happening with a php code based on the id of the current page and the parent
   elements only have “opened” classes on them, so you could only change the color
   for all the opened elements, since there isn’t a parent selector in css. And 
   there isn’t even a jQuery selector, what you could use, because the parent and
   the subitems are next to each other in the html code, so you can’t identify which“
   opened” is the parent of your current element, and not just it’s sibling.
 *  Thread Starter [direwolfy](https://wordpress.org/support/users/direwolfy/)
 * (@direwolfy)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/highlight-active-parent-item/#post-6740056)
 * That’s too bad, but thank you for the explanation! I really appreciate it.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Highlight active parent item?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/nextend-accordion-menu_ab9186.svg)
 * [Nextend Accordion Menu](https://wordpress.org/plugins/nextend-accordion-menu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextend-accordion-menu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextend-accordion-menu/)
 * [Active Topics](https://wordpress.org/support/plugin/nextend-accordion-menu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextend-accordion-menu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextend-accordion-menu/reviews/)

## Tags

 * [active](https://wordpress.org/support/topic-tag/active/)
 * [parent](https://wordpress.org/support/topic-tag/parent/)

 * 6 replies
 * 2 participants
 * Last reply from: [direwolfy](https://wordpress.org/support/users/direwolfy/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/highlight-active-parent-item/#post-6740056)
 * Status: resolved