Title: Parent/Submenu Indicators
Last modified: August 31, 2016

---

# Parent/Submenu Indicators

 *  Resolved [Mission Minded](https://wordpress.org/support/users/mission-minded/)
 * (@mission-minded)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/parentsubmenu-indicators/)
 * Hi there! First off, amazing plugin; the complexity of customization is a little
   overwhelming at first, but the more I experiment, the more impressive it is.
 * That said, I’m building a menu style and am struggling with one component – I
   want all top-level pages with submenus to show an indicator beside them. So for
   the following menu:
 * Page A >
    Page B > Page C
 * Pages A and B have submenus/children, Page C does not.
 * The current settings are as follows:
    Primary: Branch (Current Item) Secondary:
   Starting at: the Branch (Item), For Depth: 2 levels Inclusions: Branch Ancestors:
   to level 1 (root); Branch Siblings Level 1 and above OR [cmwizard menu=N title
   =”Widget” branch=current depth=2 ancestors=1 include_level=”1-” siblings=1 contains_current
   =”primary”/]
 * Right now the menu is functioning exactly as desired, except the indicator appears
   only when a page with children (or one of the child pages) is current. Per the
   menu example above, I only see the indicator beside Page A if I am ON Page A 
   or one of its children.
 * My CSS is targeting (li.menu-item-has-children > a:after) to add the indicator,
   but it appears that this class is not being added to the other parent pages in
   the menu.
 * I have to think this is possible and not too unusual a behavior for the menu,
   I’m just strugging. Hopefully I have explained this correctly, by all means let
   me know if you need more info.
 * [https://wordpress.org/plugins/custom-menu-wizard/](https://wordpress.org/plugins/custom-menu-wizard/)

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

 *  Plugin Author [wizzud](https://wordpress.org/support/users/wizzud/)
 * (@wizzud)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/parentsubmenu-indicators/#post-7215859)
 * The _menu-item-has-children_ class is set by WordPress, and CMW doesn’t do anything
   with it. CMW applies its own class to items it believes (according to its configured
   filters) are parents – _cmw-has-submneu_ – so maybe you could try targeting `
   li.cmw-has-submneu` instead?
    (If you use your browser’s Developer tools to Inspect
   the items of the output menu, you should be able to see the classes that each
   element has been given; any that begin with `cmw-` have been added by CMW; any
   others are outside of CMW’s scope.)
 *  Thread Starter [Mission Minded](https://wordpress.org/support/users/mission-minded/)
 * (@mission-minded)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/parentsubmenu-indicators/#post-7216015)
 * Hi wizzud,
 * Targeting `.cmw-has-submenu` instead of the WordPress class works, but
    it appears
   the `.cmw-has-submenu` class is only added to the current page. e.g.
 * > <li id=”menu-item-N” class=”menu-item menu-item-type-post_type menu-item-object-
   > page current-menu-item page_item page-item-16544 current_page_item menu-item-
   > has-children cmw-level-1 cmw-has-submenu menu-item-N”>
 * All other links are formatted as such:
 * > <li id=”menu-item-N” class=”menu-item menu-item-type-post_type menu-item-object-
   > page cmw-level-1 cmw-an-included-sibling menu-item-N”>
 *  Plugin Author [wizzud](https://wordpress.org/support/users/wizzud/)
 * (@wizzud)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/parentsubmenu-indicators/#post-7216022)
 * Ah!
    Right, I owe you a couple of apologies:
 * **Firstly**, for the typo – which you figured out anyway : _cmw-has-submneu_ 
   should have been _**cmw-has-submenu**_!
 * **Secondly**, having looked back at the CMW code, I misspoke when I said that
   CMW doesn’t do anything with the _menu-item-has-children_ class : it does! It
   removes that class if the item in question no longer has children in the filtered
   output.
 * **Lastly**, I misunderstood exactly what it was that you were trying to do : 
   you want the top level root items (of the displayed menu) to indicate that they_**
   used to** have child items_, regardless of whether or not they still have child
   items in the currently displayed menu.
 * With regard to the second point : the _menu-item-has-children_ class is relevant
   to the output, not the source of data from which the output was constructed. 
   As such, if the output menu item is childless then it should not have that class.
   That won’t change.
 * However, I have just submitted an update – version 3.2.5 – that puts a _cmw-menu-
   item-had-submenu_ class on any item that originally had children, regardless 
   of whether or not it still has children in the currently displayed menu.
    If 
   you update CMW to 3.2.5 and try using `li.cmw-menu-item-had-submenu` instead …?
 *  Thread Starter [Mission Minded](https://wordpress.org/support/users/mission-minded/)
 * (@mission-minded)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/parentsubmenu-indicators/#post-7216030)
 * Beautiful – `li.cmw-menu-item-had-children` works like a charm.
 * Thanks for the quick replies and update/fix!

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

The topic ‘Parent/Submenu Indicators’ is closed to new replies.

 * ![](https://ps.w.org/custom-menu-wizard/assets/icon-256x256.png?rev=1381901)
 * [Custom Menu Wizard Widget](https://wordpress.org/plugins/custom-menu-wizard/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-menu-wizard/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-menu-wizard/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-menu-wizard/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-menu-wizard/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-menu-wizard/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Mission Minded](https://wordpress.org/support/users/mission-minded/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/parentsubmenu-indicators/#post-7216030)
 * Status: resolved