Forum Replies Created

Viewing 15 replies - 136 through 150 (of 324 total)
  • Plugin Author wizzud

    (@wizzud)

    Although the Custom Menu Wizard plugin may be up-to-date, you are using an old (pre v3) instance of CMW widget settings – as noted by the “This is an old version of the widget!…” warning at the top of widget.
    Your instance of CMW is configured as :

    • Filter, Children of : Current Root Item
    • Fallbacks, Switch to Current Item (if Current Item has no ancestor)
    • Output, Title from Parent

    Your top-level menu item “회사소개” has a sub-menu:
    – when on the top-level page, CMW falls back to Children of Current Item and displays the sub-menu items
    – when on any sub-menu item’s page, CMW displays all the top-level item’s sub-menu items

    Your top-level menu item “사업분야” does not have a sub-menu:
    – when on the top-level page, there are no “children” of that top-level item that can be displayed, so there is no output.

    As far as I can see, CMW is doing exactly what it is configured to do. If I have misunderstood the problem, please correct me.

    Note that although v2 settings are supported, they are not maintained! I would strongly advise setting up a new widget with settings appropriate to what you actually want CMW to do (which is slightly unclear to me at the moment).

    Plugin Author wizzud

    (@wizzud)

    Could provide the shortcode equivalent of your widget’s settings, please?

    Plugin Author wizzud

    (@wizzud)

    So as I understand it, in Appearance/Widgets…
    1. You can’t create a new instance of CMW by dragging from the Available Widgets area onto a Widget Area
    2. You can’t drag an existing instance of a CMW widget to a new position within its Widget Area
    3. You can’t open an existing instance of a CMW widget by clicking on the down-arrow in the widget header

    Hmmm … all these things are under WordPress control, not the widget’s (and I have no problem with my 4.2.1 installations).

    I’m assuming that all 3 of these behaviours are only happening to CMW, ie. you can add other widgets to the Widget Area, move them around, and open and maintain them?

    Are you able to maintain CMW widgets via the Customizer?

    Do the CMW widgets (existing or new) react the same as other widgets when hovering over with the mouse (ie. cursor changes to hand or move, and outline darkens)?

    Do you get any javascript errors when attempting to drag a new/existing instance, or open an existing instance?

    If you View the page source – or Inspect the widget – is there any evidence of errors in the HTML that CMW is producing (I realise this might be difficult to tell without a comparison, but a quick look should show up any PHP errors, for example, and the code should at least like the expected widget form fields)?

    You mention “a lot” of CMW widgets : how many instances of CMW in one Widget Area? (I don’t see why this should have any effect on anything, but I’m curious)

    Plugin Author wizzud

    (@wizzud)

    I’m sorry, but may I ask for a bit of clarification…
    Is your problem with WordPress’s menu administration page (Appearance/Menus), or specifically/exclusively with the Custom Menu Wizard plugin (Appearance/Widgets, or Appearance/Customize)?

    If your problem is solely with CMW then can I ask what you mean by “…can not drag or open the menus…”, because I don’t understand (the only “drag” capability that CMW provides is the ability to move its Assist overlay around the screen).

    If it’s WordPress’s administration of Custom Menus that is proving troublesome then I’m afraid I don’t have an answer for you.

    Plugin Author wizzud

    (@wizzud)

    I think this sort of setup might be what you’re after?…

    [cmwizard menu=N branch=current ancestors=2 ancestor_siblings=2 exclude_level="1" siblings=1 alternative="no-output,output"/]

    Obviously this is the shortcode equivalent of the widget settings!

    In words, I have interpreted your request as being:
    – if a root item has descendants, show those descendants (but not the root item itself) if the root item of any of its descendants are the Current Item
    – otherwise, show the entire menu

    The widget settings are:
    – Primary Filter : Branch = Current Item
    – Secondary Filter : leave defaults, ie. unlimited depth, starting at Current Item
    – Inclusions : the Branch Ancestors, with their Siblings, back up to level 2, and the Branch Siblings (where Branch is the Current Item, from the Primary Filter)
    – Exclusions : level 1
    – Alternative : No output from… Final Output

    You need the Level 1 exclusion otherwise when you’re on page A you get all the root items as well as the page A descendants.
    The Alternative kicks in when the main settings produce no output, and it has no configuration set so it will use the defaults, ie. the entire menu (Level 1, unlimited). If you wanted to limit it to, say, just the root level items then you could specify depth=1, eg. …

    [cmwizard menu=N branch=current ancestors=2 ancestor_siblings=2 exclude_level="1" siblings=1 alternative="no-output,output"]depth=1[/cmwizard]

    It’s quite likely that this isn’t exactly what you meant, in which case I apologise for my misunderstanding, but I hope it helps…

    Plugin Author wizzud

    (@wizzud)

    Where to paste the shortcodes…
    You can place shortcodes in a post or page – as you have tried – but you need to bear in mind that whether or not you see any output from the shortcode will depend very much on the configuration applied to that instance of CMW, and if the CMW conditions are actually being met when the post in question is being shown.

    You can also place a shortcode into a text widget that is in one of your theme’s Widget Areas. But please note that your theme (or some other plugin) has to enable processing of widget shortcodes in order for the shortcode to be interpreted by WordPress.

    Pasting in sidebar.php…
    I’m not sure whether you meant this literally (ie. editing sidebar.php), but you should not need to do this. Either place the CMW widget into a Widget Area, or use a CMW shortcode in a post/page or a text widget.

    I can see that you have menu items for reviews and news, that point to category pages for posts with the relevant category, but you don’t say what your specific CMW menus are supposed to show when either of those pages is being displayed? Please bear in mind that CMW will only show items that exist on the configured custom menu, ie. it will not, for example, list all posts that have a ‘news’ category unless those posts are all individually attached to a custom menu in their own right (which is unlikely).

    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.

    Plugin Author wizzud

    (@wizzud)

    The LI element of the current menu item usually has a class of current-menu-item, so you could use li.current-menu-item {} or li.current-menu-item > a {} (depending on which element you need to style). You may need to further qualify them (be a bit more specific) to override your theme’s rules, and you can always add a specific class or id of your own to the widget if needed.

    If you use li.current-menu-item {} you may need to negate the cascade effect to any elements below the LI.current-menu-item, eg.

    #menu-main-2 li.current-menu-item {text-transform:uppercase;}
    #menu-main-2 li {text-transform:none;}
    Plugin Author wizzud

    (@wizzud)

    Hmmm … not really.
    The difference here is that the Samen… item is a page item and the Verhalen… item is a category item, and your CSS is making a distinction between the 2 as to which one should have an open sub-menu : page items that are current (or a parent of) will show sub-menus, whereas category items that are current will not (compare the classes on each of the items and look at the rule applied when Samen… has either current_page_item or current-page-parent class).

    Plugin Author wizzud

    (@wizzud)

    Sorry, took me a while to spot it…

    It’s because the Actueel menu item, like its Agenda sub-item, is also a category link to the agenda category, and as such it is being picked up (by CMW) as the being the first instance of a possible parent post (when there’s no current menu item). If you display a single Agenda item and look at the classes (in the main nav) of both the Actueel LI item and its Agenda LI sub-item and you’ll see what I mean : they both have classes of
    current-post-ancestor current-menu-parent current-post-parent

    Ok, that explains what is happening, but as to what can be done about it within CMW…

    When there’s no current item and CMW has been told to look for a possible parent item, it uses the 1st instance it finds (Actueel, in this case). It can only use one, and opting for the first one seemed reasonable … but maybe it should use the last it finds instead? That would solve your problem, but is it also reasonable when there are multiple candidates at the same level? Sorry, I know it doesn’t help you immediately, but I need to give the entire “first-found” philosophy some careful thought…

    Plugin Author wizzud

    (@wizzud)

    At present, CMW only offers the 4 on-off options (current/branch item and/or its root), so No. Sorry.
    I’ll look into providing options that a bit more flexible … but no guarantees.

    Plugin Author wizzud

    (@wizzud)

    Under the Fallbacks section, try setting the Try items marked as Parent of Current checkbox

    Plugin Author wizzud

    (@wizzud)

    I have just released v3.1.4, which, besides a couple of bug fixes, has a new option in the Output section – below Set Title from – that might do what you asked me about.

    Plugin Author wizzud

    (@wizzud)

    Thanks for the heads up.
    Just released v3.1.4 which fixes this bug and another one, also related to shortcode processing of an Alternative.
    Apologies for the inconvenience, and thank you for your investigation and feedback: it’s appreciated.

    Plugin Author wizzud

    (@wizzud)

    Sorry, but at the moment there’s no easy way to do this.

    CMW effectively consists of 2 parts : there’s the code that controls and builds the widget, and there’s the code that does the actual filtering and builds the menu. The title is really part of the widget code, but the widget allows that title to be overridden by a value passed back to it from the filter code. Unfortunately, the filter code currently only passes back the menu item’s title, nothing else about the menu item (such as its href).
    It’s still possible to hook into the widget’s widget_title filter and wrap the title in an anchor, but your code would have to go fetch the menu for itself, scan through the items for a title match (hoping there’s only one!), construct the link using the item’s href, and pass it back to the CMW widget instance. As I said, not easy.

    I’ll look into providing an option for CMW to do it … but I can make no promises.

    PS. I’ve made an assumption that you are configuring CMW for Branch = Current Item, however if you are using it with a specific menu item as the Branch then you might be able to use something like the Widget Title Links plugin?

Viewing 15 replies - 136 through 150 (of 324 total)