Plugin Directory

Test out the new Plugin Directory and let us know what you think.

Custom Menu Wizard Widget

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


  • change : minimum WordPress version is now 3.9! (because require .dashicons-before, as part of needing to dump jQuery UI theme)
  • bugfix : ! Possible Breaker ! fixed incorrect determination of current item when a "current menu item" has a duplicate of itself as an ancestor (hopefully rare). There is a (very slight) chance that this may affect your displayed menu : if it does, toggle the Fallback option for If more than 1 possible Current Item, and I apologise for not catching the problem earlier
  • change : dumped jQuery UI's Smoothness theme for WordPress's own CSS, to work around styling issues with WP4.5
  • change : removed the hide_empty option (only relevant pre WP3.6) entirely
  • change : remove support for Widget Customizer plugin (part of core from WP3.9)
  • change : localized all text used by assist, to reduce byte footprint of the widget
  • add : in customizer, if there are no menus, link to the customizer's menus panel
  • add : opt in to customizer selective refresh for widgets (WP4.5)
  • bugfix : correction to regexps that sanitize the alternative
  • bugfix : corrected some problems with the assist dialog's auto-sizing, particularly after dragging
  • tweak : squidged the widget form a bit, to reduce byte footprint of the widget
  • tweak : included screenshots in html version of documentation


  • addition : add cmw-current-item class to the menu item that CMW is using as 'current item'


  • addition : add cmw-menu-item-had-children class to any menu item that originally had children, regardless of whether it still does when output


  • bugfix : improve handling of dynamically-generated items, by pre-sorting into menu_order order and coping with negative item ids
  • documentation : updated FAQs


  • tweak : minor updates to documentation, and verified for WordPress v4.4


  • bugfix : fixed initial widget display when adding new widget instance in the customizer


  • bugfix : missing echo statement for the update message


  • internationalization


  • addition : expanded Title From to allow absolute ancestor levels (besides root) and relative ancestor levels
  • addition : added a fallback option to switch determination of Current Item from first-found to last-found
  • addition : added a shortcode attribute that loads an existing widget instance : [cmwizard widget=N/]
  • documentation : updated, and provided an html version in the plugin download


  • bugfix : in shortcode processing, any supplied Alternative settings weren't being used. thanks corrideat
  • bugfix : prevent texturization of shortcode's content, for when it is being used with an Alternative setting
  • addition : the ability to make a title into a link when the title has been set from a menu item


  • tweak : minor change to css for the assist when running under the Customizer (WordPress 4.1)


  • modified the readme : documentation for the Shortcode Attributes has been moved to the Installation page (to avoid being truncated)


  • bugfix : only show the allow_all_root setting in the shortcode equivalent if the primary filter is by branch
  • addition : work-around for when a theme inadvertently(!) de-registers the widget, which then prevents the shortcode working


  • addition : new Alternative section which takes a cmwizard shortcode and conditionally applies it as an entirely new widget configuration
  • addition : new fallback switch which enables an item marked as current_item_parent to be used as current item when no other current item is found
  • bugfix : updated the determination of current item so that a paged (?paged=2, etc) Home page still shows Home page as being current
  • bugfix : fixed code introduced in v3.0.4 that prevented CMW script loading on the customizer page - when the Widget Customizer plugin is loaded - for WordPress v3.8 and below
  • bugfix : stop disabling selected fields based on other settings, because this caused the customizer to wipe values that may have been still required


  • bugfix : corrected the display of the "No Current Item!" warning in the "assist"
  • bugfix : corrected the enabling/disabling of a couple of fields in the widget form, and tweaked the indentation for better responsiveness
  • bugfix : corrected the options setup when in accessibility mode with javascript enabled
  • addition : added a warning about the accuracy of the shortcode when javascript is disabled
  • addition : extended the All Root Items inclusion to be a selectable number of levels (as per the Exclusions by Level)


  • bugfix : removed all occurrences of "Plugin " followed by "Name" from everywhere except the main plugin file to avoid update() reporting Invalid Header when activating straight from installation (rather than from the Plugins page)
  • tweak : eliminate the over-use of get_title() when determining the widget title
  • tweak : added self-terminating forward slash to generated shortcodes
  • change : prepare for WordPress v4 (avoid use of deprecated functions)


  • bugfix : the shortcode display on new instances of the widget (in admin) did not initially reflect the automatically-selected menu


  • bugfix : changed the determination of pre-existing legacy widgets versus brand new widget instances, to get round problems encountered when other plugins utilise the widget_form_callback filter to inject fields into a widget
  • addition : added a couple of filters


  • ! Rewrite, and Change of Approach ! The widget has had a major rewrite! The Children of filter has been replaced with a Branch filter, with a subsequent shift in focus for the secondary filter options, from the children's level (0, 1 or more items) up to the branch level (a single item!). This should provide a more intuitive interface, and is definitely easier to code for. However, it only affects new instances of the widget; v2 instances are still fully supported.

    Please also note that the shortcode tag for v3 has changed to [cmwizard], with a revised set of attributes. The old shortcode tag is still supported, but only with the v2 attribute set, and only providing v2 functionality, ie. it is the shortcode tag that determines which widget version to use, and the appropriate attribute set for that version.

    There is no automatic upgrade of widget settings from v2 to v3! I suggest bringing up the "assist" for the existing v2 widget, running it side-by-side with the "assist" of a new instance of the widget, and using them to the compare the desired outputs. I would also strongly recommend that you put your old widgets into the inactive area until you are completely happy with their new replacements. If you are upgrading from version 2, and you would like a bit more information, this article might help.

  • change : the minmum requirement for WordPress is v3.6
  • addition : more options for requiring that the "current" menu item be present at some point in the filter process
  • addition : Branch filter levels can be either relative (to the selected Branch item) or absolute (within the menu structure)
  • addition : menu items can now be excluded from the final output, either explicitly by id (optionally including descendants), or by level
  • addition : the ids of Items can be set to include all descendants
  • addition : the inclusion of branch ancestors, and optionally their siblings, can be set by absolute level or relative number of levels
  • addition : the widget title can now be automatically set from the root level item of the Branch item or current menu item
  • addition : the shortcode for a widget's current settings is now also displayed at the base of the widget (as well as at the base of the "assist")
  • addition : "title_tag" has been added to the shortcode options, enabling the default H2 to be changed without having to resort to coding a filter
  • addition : as an alternative to using the "assist", "findme" has been addded to the shortcode options to aid editors with the location of posts containing a CMW shortcode ([cmwizard findme=1])
  • This release includes an upgrade to v2.1.0 for all existing version 2 widgets/shortcodes - please read the v2.1.0 changes below.

2.1.0 (incorporated into v3.0.0 release)

  • change : the minmum requirement for WordPress is v3.6
  • bugfix : handle duplicate menu item ids which were causing elements to be ignored
  • bugfix : fix IE8 levels indentation in the "assist"
  • bugfix : the "assist" is now "fixed" position (toggle-able back to absolute), mainly to get around a bug in jQuery UI draggable
  • remove : take out the automatic selection of shortcode text (inconsistent cross-browser, so just triple click as usual; paste-as-text if possible!)
  • addition : in the "assist", provide collapsible options for those larger menus
  • addition : added utility to the "assist" enabling posts containing a CMW shortcode to be located
  • change : in the "assist", swap the menu Items checkboxes for clickable Ticks
  • change : in the "assist", tweak styling and make more responsive to re-sizing
  • change : made compatible with Widget Customizer
  • Note : there is no separate release available for this version!


  • change : modified determination of current item to cope better with multiple occurences (still first-found, but within prioritised groups)
  • change : display of the upgrade notice in the plugins list has been replaced with a simple request to read the changelog before upgrading


  • bugfix : prevent PHP warnings of Undefined index/offset


  • bugfix : clearing the container field failed to remove the container from the output
  • addition : in the "assist", added automatic selection of the shortcode text when it is clicked
  • addition : remove WordPress's menu-item-has-children class (introduced in v3.7) when the filtered item no longer has children
  • change : tweaked styles and javascript in admin for WordPress v3.8


  • bugfix : missing global when enqueuing scripts and styles for admin


  • bugfix : the Include Ancestors option was not automatically including the Parent
  • bugfix : the "assist" was incorrectly calculating Depth Relative to Current Item when the current menu item was outside the scope of the Filtered items
  • behaviour change : only recognise the first "current" item found (used to allow subsequent "current" items to override any already encountered)


  • bugfix : an incorrect test for a specific-items filter prevented show-all producing any output


  • ! Possible Breaker ! The calculation of Start Level has been made consistent across the Show all and Children of filters : if you previously had a setup where you were filtering for the children of an item at level 2, with start level set to 4, there would have been no output because the immediate children (at level 3) were outside the start level. Now, there will be output, starting with the grand-children (at level 4).
  • ! Possible Breaker ! There is now deemed to be an artificial "root" item above the level 1 items, which mean that a Children of filter set to "Current Parent Item" or "Current Root Item" will no longer fail for a top-level "current menu item". If you have the "no ancestor" fallback set then this change will have no impact (but you may now want to consider turning the fallback off?); if you don't currently use the "no ancestor" fallback, then where there was previously no output there will now be some!
  • added new option : Items, a comma- or space-delimited list of menu item ids, as an alternative Filter
  • added new option : Depth Relative to Current Item to the Filter section (depth_rel_current=1 in the shortcode)
  • added new option : Must Contain Current Item to the Output section (contains_current=1 in the shortcode)
  • changed the widget's "demo" facility to "assist" and brought it into WordPress admin, with full interactivity with the widget
  • refactored code


  • bugfix : fallback for Current Item with no children was failing because the parent's children weren't being picked out correctly


  • added some extra custom classes, when applicable : cmw-fellback-to-current & cmw-fellback-to-parent (on outer UL/OL) and cmw-the-included-parent, cmw-an-included-parent-sibling & cmw-an-included-ancestor (on relevant LIs)
  • corrected 'show all from start level 1' processing so that custom classes get applied and 'Title from "Current" Item' works (regardless of filter settings)
  • changed the defaults for new widgets such that only the Filter section is open by default; all the others are collapsed
  • in demo.html, added output of the shortcode applicable to the selections made
  • in demo.html, added a link to the documentation page
  • corrected 2 of the shortcode examples in the readme.txt, and made emulator (demo) available from the readme


  • added custom_menu_wizard shortcode, to run the widget from within content
  • moved the 'no ancestor' fallback into new Fallback collapsible section, and added a fallback for Current Item with no children
  • added an option allowing setting of title from current menu item's title
  • fixed a bug with optgroups/options made available for the 'Children of' selector after the widget has been saved (also affected disabled fields and styling)
  • don't include menus with no items
  • updated demo.html


  • added 'Current Root Item' and 'Current Parent Item' to the Children of filter
  • added Fallback to Current Item option, with subsidiary options for overriding a couple of Output options, as a means to enable Current Root & Current Parent to match a Current Item at root level
  • added an Output option to include both the parent item and the parent's siblings (for a successful Children of filter)
  • added max-width style (100%) to the Children of SELECT in the widget options
  • added widget version to the admin js enqueuer
  • ignore/disable Hide Empty option for WP >= v3.6 (wp_nav_menu() now does it automatically)
  • included a stand-alone helper/demo html page
  • rebuilt the Children of SELECT in the widget options to cope with IE's lack of OPTGROUP/OPTION styling
  • moved the setting of 'disabled' attributes on INPUTs/SELECTs from PHP into javascript


  • Initial release

Requires: 3.9 or higher
Compatible up to: 4.5.5
Last Updated: 9 months ago
Active Installs: 20,000+


4.9 out of 5 stars


1 of 3 support threads in the last two months have been marked resolved.

Got something to say? Need help?


Not enough data

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

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