Viewing 11 replies - 16 through 26 (of 26 total)
  • Plugin Author wizzud

    (@wizzud)

    Ah! Glad you’ve got it sorted, and thanks for your patience.

    One last thing : if the plugin you were using to generate those child items is a publicly available one, from the WordPress repository, would you mind telling me what it’s called so I see what it does, how and when it does it, and whether I can get CMW to play nicer with it?

    Thread Starter dpedrinha

    (@dpedrinha)

    Sure. It was this plugin: https://gecka-apps.com/wordpress-plugins/geka-submenu/

    Let me know if you need more help to debug it.

    Thread Starter dpedrinha

    (@dpedrinha)

    Back to the show and hide.

    I was trying to use bootstrap responsive utilities since my theme uses it. But it’s not working properly.

    For instance, if I put “hidden-xs hidden-sm” classes in CMW Container -> Class it hides the content of the CMW in small devices. But the title persists. And I want to hide the widget entirely.

    So the right place to add this code would be on Classes -> Widget Class, right?

    But it just doesn’t work. If I debug the page, those bootstrap class styles are never loaded. The final HTML for the widget looks like this:

    class="widget widget_custom_menu_wizard"

    Even though the short code is:

    [cmwizard menu=15 title="Acupuncture Meridians" branch=current depth=2 depth_rel_current=1 include_level="1-" siblings=1 widget_class="hidden-xs hidden-sm" alternative="no-current,menu"]title="Acupuncture Meridians" exclude_level="2"[/cmwizard]

    If I add it to Classes -> Menu Class = “menu-widget hidden-xs hidden-sm” it works too, but again, the title stays visible.

    Any idea?

    Thanks

    Plugin Author wizzud

    (@wizzud)

    Phew! Took me half an hour to spot it, but…

    You just need to those same classes to the definition of the Alternative, ie.

    [cmwizard menu=15 title="Acupuncture Meridians" branch=current depth=2 depth_rel_current=1 include_level="1-" siblings=1 widget_class="hidden-xs hidden-sm" alternative="no-current,menu"]title="Acupuncture Meridians" exclude_level="2" widget_class="hidden-xs hidden-sm"[/cmwizard]

    The only option carried over from the original to the Alternative is the menu id, so you need to repeat the widget_class option in the Alternative.

    Thread Starter dpedrinha

    (@dpedrinha)

    Ahh! Makes sense!

    Thanks

    Thread Starter dpedrinha

    (@dpedrinha)

    Now I have another problem. LOL

    I’m using All-import plugin to generate my database.

    When I add this shortcode to the pages template before importing:

    [cmwizard menu=9 title="Meridianos e Pontos" branch=current depth=2 depth_rel_current=1 include_level="1-" exclude="478" siblings=1 widget_class="hidden-xs hidden-sm" alternative="no-current,menu"]title="Meridianos e Pontos" exclude_level="2" widget_class="hidden-xs hidden-sm"[/cmwizard]

    It complains: Post content template is invalid: Unexpected token COMMA, statement was expected.

    The problem is after the “alternative”. If I remove everything after (and including) the alternative, it works. Actually if I remove the COMMA from the “alternative” the All-import won’t complain, but of course, your plugin stops working.

    The code also works if I put it on my pages manually, but for some reason the All-import is not allowing it.

    I have more than 400 pages for each language, I can’t do it one-by-one.

    Any idea?

    Thread Starter dpedrinha

    (@dpedrinha)

    Well, since my alternative is, for now, just for one page, I fixed it with one code for the page manually and another code for the rest of the pages, without the alternative option.

    But I think it’s worth looking into it.

    I also messaged the wp-all import guys about this problem.

    Plugin Author wizzud

    (@wizzud)

    I don’t know if it well help, especially given that you’ve now worked around it, but you can switch the comma out for a space? eg.

    ... alternative="no-current menu" ...

    Thread Starter dpedrinha

    (@dpedrinha)

    If I remove the comma and use a space the wp-all import accepts the shortcode, but your plugin doesn’t work properly. Everything after the place where the comma should be becomes plain text.

    Plugin Author wizzud

    (@wizzud)

    Ok.

    Umm … just to clarify, can I assume that this is still a problem with the wp-all import?
    In other words, putting the space-separated alternative option directly into a page/post works ok, but it fails after being imported?

    I just want to make sure that CMW is doing what it’s supposed to, because all the following are equivalent (and work for me, I’ve just tried them)…
    ...alternative="no-current,menu"...
    ...alternative="no-current menu"...
    ...alternative="no-current , menu"...
    ...alternative="no-current ,,,, menu"...
    ...alternative="no-current , , , , menu"...
    (the CMW parser splits the quoted string parameter on one-or-more spaces/commas)

    Thread Starter dpedrinha

    (@dpedrinha)

    It works directly on the page either with comma or space.

    On the wp-all import it doesn’t work in any way. It’s not that it fails after being imported, the import plugin itself doesn’t allow the import at all. It just gives an error and doesn’t import the page.

    But in contact with them they told me that on their pluging shortcodes should be added using backslash before every open bracket “\[“.

    I can tell that it works without the backslash when the code has no comma, but I haven’t tested and I can’t test the backslash option for codes with comma right now. But it makes sense and should work.

    I’ll be adding a new language to my website this week and then I can test it. I’ll let you know.

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘Is there a way to hide/show it in small/big devices?’ is closed to new replies.