WordPress.org

Ready to get started?Download WordPress

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.

If you have a question or problem that is not covered here, please use the integrated Support forum.

Are there any known problems/restrictions?

Yep, 'fraid so :

  1. The widget will only recognise one "current" item (as of v2.0.2, that's the first one encountered; prior to that it was the last one found). It is perfectly possible to have more than one menu item marked as "current", but if CMW has been configured to filter on anything related to a "current menu item" it can only choose one. The simplest example of multiple "current" items is if you add the same page to a menu more than once, but any other plugin that adds and/or manipulates menu items could potentially cause problems for CMW.
  2. The widget's "assist" uses jQuery UI's Dialog, which unfortunately (in versions 1.10.3/4) has a really annoying bug in its handling of a draggable (ie. when you drag the Dialog's title bar to reposition it on the page) when the page has been scrolled. It is due to be fixed in UI v1.11.0, but meantime I have defaulted the Dialog to fixed position, with an option to toggle back to absolute : it's not perfect but it's the best compromise I can come up with to maintain some sort of useability.

Why isn't it working? Why is there no output?

I don't know. With all due respect (and a certain amount of confidence in the widget) I would venture to suggest that it is probably due to the option settings on the widget/shortcode. The quickest way to resolve any such issues is to use the widget's interactive "assist", and ensure that you set the current menu item correctly for the page(s) that you are having problems with. However, I am well aware that I not infallible (and it's been proven a fair few times!), so if you still have problems then please let me have as much information as possible (the shortcode for your settings is a good start?) and I will endeavour to help. Please note that simply reporting "It doesn't work" is not the most useful of feedbacks, and is unlikely to get a response other than, possibly, a request for more details.

How do I use the "assist"?

The widget's interactive "assist" is specific to each widget instance. It is a javascript-driven emulator that uses the widget instance's option settings - including the menu selected - to build a pictorial representation of the menu and show you, in blue, which menu items will be output according to the current option settings. It also shows a very basic output list of those menu items, although it will not apply some of the more advanced HTML-modifying options such as can be found under the Container, Classes or Links sections. Any of the displayed menu items can be designated as the "current menu item" simply by clicking on it (click again to deselect, or another item to change). The "current menu item" is shaded red, with its parent shaded orange and ancestors shaded yellow. All changes in the "current menu item" and the widget options are immediately reflected by the "assist" (text fields in the widget options simply need to lose focus).

The red cross to the left of each menu item toggles the Exclusions setting for the item and/or its descendants. The button has 3 settings :

  • Off (dimmed)
  • Just this item (white on red)
  • This item plus all its descendants (white on red, with a small yellow plus sign)

Just click through the toggle states. When the Primary Filter is set to "Items", the green tick buttons to the right of each menu item work in the same way.

Once you are happy with the results, having tested all possible settings of "current menu item" (if it applies), then simply Save the widget. Alternatively, copy-paste the shortcode text - at the base of either the "assist" or the widget form - straight into your post (you do not need to Save the widget!). The widget does not have to Saved to test any of the options.

Is there an easy way to construct the shortcode?

Yes, use a widget form. The shortcode for all the selected/specified options is show at the base of the widget (v3+) and the base of the "assist". The widget does not have to be placed within a widget area, it can also be used from the Inactive Widgets area. And you do not need to Save the widget just to get a shortcode!

How do I get the menu item ids for the 'Items' option?

Use the widget's interactive "assist" (see above). Within the representative menu structure, each menu item's id is set in its title attribute, so should be seen when the cursor is moved over the item. A simpler way is to check the Items option : the "assist" will then show a green tick "checkbox" to the right of each menu item and you simply [un]check the items as required. Each selection will be reflected back into the widget's Items settings, and also in the shortcode texts.

The more painstaking way is to go to Appearance, Menus and select the relevant menu; hover over the edit, Remove, or Cancel link for an item and look in the URL (the link's href) for menu-item=NNN ... the NNN is the menu item id.

How do I get the menu item ids for the 'Exclude Ids' option?

The "assist" shows a red cross "checkbox" to the left of each menu item, and [un]checking the items will refelect back into the options and shortcode texts. Otherwise, it's the same principle as outlined above for Items ids.

What's the difference between including Branch Siblings (or Branch Ancestors + Siblings), and switching to 'Level' instead of 'Item' in the Secondary Filter section?

If you elect to include Branch [Ancestor] Siblings, you will only get the siblings, not their descendants (assuming they have any). On the other hand, if you make Starting at use 'Level' instead of 'Item' then siblings and their descendants will be added to the filter.

For example, let's say that Bravo and Charlie are sibling items immediately below Alpha, and that Bravo is the selected Branch Item, with Starting at set to "the Branch" (ie. Bravo). If you switch from "Item" to "Level" then both Bravo, Charlie, and all their descendants, will become eligible for filtering. If you left "Item" enabled, and switched on the inclusion of Branch Siblings, then Bravo and Charlie would both still be eligible, but only Bravo's descendants would be; not Charlie's!

Where is the styling of the output coming from, and how do I change it?

The widget does not supply any ouput styling (at all!). This is because I have absolutely no idea where you are going to place either the widget (sidebar, footer, header, ad-hoc, etc?) or the shortcode (page content, post content, widget content, custom field, etc?) and everyone's requirements for styling are likely to be different ... possibly even within the same web page's output. So all styling is down to your theme, and if you wish to modify it you will need to add to your theme's stylesheet.

The safest way to do this is via a child theme, so that any changes you make will not be lost if/when the main theme gets updated. The best way to test your changes is by utilising the developer capabilities that are available in most modern browsers (personally, I could not do without Firefox and the Firebug extension!) and dynamically applying/modifying styles, possibly utilising the custom classes that the widget applies to its output, or the Container options for a user-defined id or class.

How can I find all my posts/pages that have a CMW shortcode so that I can upgrade them?

There is a button on the widget's "assist" - [...] - that will provide a list of posts/pages whose content, or meta data (custom fields), contains any CMW shortcode. Each entry is a link that opens the item in a new tab/window. The link's title gives a bit more information : post type, id, whether the shortcode(s) are in content and/or meta data, and the shortcode(s) concerned. This utility does not check things like text widgets, plugin-specific tables, theme-provided textareas, etc.

There is also an extension to the shortcode - [cmwizard findme=1/] - that will output the same information, should you not be able to use the "assist" (for some unknown reason). You may optionally provide a title attribute; any other attributes are ignored. Note that output from this shortcode extension is restricted to users with edit_pages capability.

Requires: 3.6 or higher
Compatible up to: 3.9.2
Last Updated: 2014-7-30
Downloads: 66,487

Ratings

4 stars
4.7 out of 5 stars

Support

9 of 10 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