• Resolved ccgjosh

    (@ccgjosh)


    I apologize if this has been answered already but the forum search isn’t so great. Not sure why I’m struggling with this as I’ve used your plugin before without issue. Here’s an example of what I have:

    – Menu Item 1
    – Menu Item 2
    – Menu Item 3
    — Submenu Item 1
    — SubSubmenu Item 1
    — SubSubmenu Item 2
    — SubSubmenu Item 3
    — Submenu Item 2
    — SubSubmenu Item 1
    — SubSubmenu Item 2
    —– SubSubSubmenu Item 1
    —– SubSubSubmenu Item 2
    —– SubSubSubmenu Item 3
    — SubSubmenu Item 3
    — Submenu Item 3
    – Menu Item 4

    What I would like to do is show Submenu items from Menu Item 3 (Submenu Item 1, Submenu Item 2, Submenu Item 3). Once a user clicks on one, I would like to show that Submenu item and it’s direct decendents only (hiding the other Submenu items). Then when a SubSubmenu item is selected, if there children, show them while still showing both the parent SubSubmenu item and the Submenu Item.

    Thanks for your help.

    https://wordpress.org/plugins/custom-menu-wizard/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author wizzud

    (@wizzud)

    Yours is a perfectly reasonable requirement, and it should be more straightforward than it is … but it isn’t, and that’s something I may have to address.
    Meantime, the only way I could find to do it – using CMW config only – was with Exclusions : specifically exclude all root items, along with their descendants for all bar the Menu Item 3. Something along the lines of (shortcode equivalent) …

    [cmwizard menu=NN branch=current ancestors=2 exclude="AA+,BB+,CC,DD+" alternative="no-current,output"]branch=CC start_at="+1" depth=1[/cmwizard]

    … where NN is your menu id, and AA, BB, CC & DD are the ids of your root Menu Item 1 thru 4 (from above) respectively.
    NB: ancestors=2 is an Inclusion: Branch Ancestors to Level 2.

    I hope this helps, and I apologise for the delay in answering.

    PS. There is another way, but it would require the addition of a couple of specific CSS rules to only show the “current path” items, because it would actually output more items than you want. The only advantage it has over the one above is that it would not require updating if you were to add a new root item to the menu.

    Thread Starter ccgjosh

    (@ccgjosh)

    Thanks for your response — I ended up using a basic setup in CMW and CSS to hide items that were not related to current-menu-item or current-menu-ancestor. As you said this is more advantageous as I would not have to remember to add more exclusions if more root items were added.

    I did notice that I could get pretty close to what I wanted if I had ‘Current Item’ selected as the Primary Filter Branch. However I couldn’t use this setup as I wanted the menu to be the same on all inner pages.

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

The topic ‘Can't figure out correct options’ is closed to new replies.