WordPress.org

Plugin Directory

Custom Menu Wizard Widget

Show branches or levels of your menu in a widget, or in content using a shortcode, with full customisation.

This plugin is a boosted version of the WordPress "Custom Menu" widget. It provides full control over most of the parameters available when calling WP's wp_nav_menu() function, as well as providing pre-filtering of the menu items in order to be able to select a specific portion of the custom menu. It also automatically adds a couple of custom classes. And there's a shortcode that enables you to include the widget's output in your content.

Features include:

  • Display an entire menu, just a branch of it, just certain level(s) of it, or even just specific items from it!
  • Select a branch based on a specific menu item, or the current menu item (currently displayed page)
  • Specify a relative or absolute level to start at, and the number of levels to output
  • Include ancestor item(s) in the output, with or without siblings
  • Exclude certain menu items, or levels of items
  • Make the output conditional upon the current menu item being found in different stages of the filter selection process
  • Automatically add cmw-level-N and cmw-has-submenu classes to output menu items
  • Allow the widget title to be entered but not output, or to be set from the current menu item or selected branch item
  • Select hierarchical or flat output, both options still abiding by the specified number of levels to output
  • Add/specify custom class(es) for the widget block, the menu container, and the menu itself
  • Modify the link's output with additional HTML around the link's text and/or the link element itself
  • Use Ordered Lists (OL) for the top and/or sub levels instead of Unordered Lists (UL)
  • Shortcode, [cmwizard], available to run the widget from within content
  • Interactive "assist" to help with the widget settings and/or shortcode definition
  • Utility to find posts containing this plugin's shortcode
  • NEW Specify an alternative configuration to use under certain conditions (dual-scenario capability)

Current documentation for the Widget Options can be found under Other Notes. The associated Shortcode Parameters are documented under Installation (too much text to fit all on one page!).

Please, do not be put off by the number of options available! I suspect (and I admit that I'm guessing!) that for the majority of users there are probably a couple of very common scenarios:

  1. Show an entire menu...

    • Drag a new Custom Menu Wizard widget into the sidebar, and give it a title (if you want one)
    • Select the menu you wish to use (if it's not already selected)
    • Save the widget!
    • Equivalent shortcode resembles [cmwizard menu=N title="Your Title"/]
  2. Show the current menu item, plus any descendants...

    • Drag a new Custom Menu Wizard widget into the sidebar, and give it a title (if you want one)
    • Select the menu you wish to use (if it's not already selected)
    • Open the FILTERS section :
      • under Primary Filter, click on the Branch radio
    • Save the widget!
    • Equivalent shortcode resembles [cmwizard menu=N title="Your Title" branch=current/]
  3. Show just the descendants of the current menu item (if there are any)...

    • Drag a new Custom Menu Wizard widget into the sidebar, and give it a title (if you want one)
    • Select the menu you wish to use (if it's not already selected)
    • Open the FILTERS section :
      • under Primary Filter, click on the Branch radio
      • under Secondary Filter, set Starting at to "+1 (children)"
    • Save the widget!
    • Equivalent shortcode resembles [cmwizard menu=N title="Your Title" branch=current start_at="+1"/]
  4. Always show the top level items, but when the menu contains the current item then also show that current item, with its ancestors and immediate children...

    • Drag a new Custom Menu Wizard widget into the sidebar, and give it a title (if you want one)
    • Select the menu you wish to use (if it's not already selected)
    • Open the FILTERS section :
      • under Primary Filter, click on the Branch radio
      • under Secondary Filter, set Depth to "2 levels" (ie. current item plus immediate children)
      • under Inclusions, set Branch Ancestors to "to level 1 (root)", and set Level to "1"
    • Open the ALTERNATIVE section :
      • set On condition to "Current Item is NOT in..." and "Menu" (the 2nd dropdown)
      • in the Then switch settings to textarea, type in "[cmwizard depth=1/]" (without the quotes!)
    • Save the widget!
    • Equivalent shortcode resembles [cmwizard menu=N branch=current depth=2 ancestors=1 include_level="1" alternative="no-current,menu"]depth=1[/cmwizard]

If you like this widget (or if you don't?), please consider taking a moment or two to give it a Review : it helps others, and gives me valuable feedback.

Documentation for version 2 of the widget can be found here or here.

Requires: 3.6 or higher
Compatible up to: 4.1.2
Last Updated: 2015-4-2
Active Installs: 10,000+

Ratings

4.8 out of 5 stars

Support

5 of 9 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

0,1,0
0,1,0 50,2,1 100,2,2 100,1,1
100,1,1
100,2,2
100,1,1
100,2,2
100,1,1 100,1,1
100,1,1