• Finding that mega menu I am using with Theme Impreza has erroneous code, could the author @megamenu or @tomhemsley can resolve that and make it bug free.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi,

    Thanks for posting a link.

    I do not know what you mean by ‘Erroneous code’ – please could you take an annotated screenshot and post it here so I can understand what you mean?

    Regards,
    Tom

    Thread Starter shweta1807

    (@shweta1807)

    Hi Tom.

    The issue is that we endeavour to ensure that our site only uses valid HTML (as we are a development company that is commercially important to us). When we used the industry standard W3 Validator service our Home Page is now only showing one HTML error. This relates to the illegal inclusion of DIVs within an Un-ordered List. It appears to us that this issue has been introduced by Mega Menu.

    Details of the error can be found here:
    https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.aleaitsolutions.com%2F

    I know that you have asked for a screendump but I can see no way to add one to the ticket. However the error message is as follows:

    Error: Element div not allowed as child of element ul in this context. (Suppressing further errors from this subtree.)
    From line 210, column 1818; to line 210, column 1878

    e hidden"><div id="mega-menu-wrap-us_main_menu" class="mega-menu-wrap"><div c

    Contexts in which element div may be used:
    Where flow content is expected.
    As a child of a dl element.
    Content model for element ul:
    Zero or more li and script-supporting elements.

    Thanks in advance for any help that you can give us in resolving this issue.

    Plugin Author megamenu

    (@megamenu)

    Hi,

    Thanks for the explanation.

    Please see:

    https://screencast.com/t/o9uprgyjYDg

    You will need to edit your theme and find where the <ul> that wraps the menu is output, then remove it from the template. Unfortunately I do not have a copy of Impreza (it is a premium theme), so I can’t tell you exactly where that <ul> is output. You may find it if you search all your theme files for ‘w-nav-list’.

    This guide may also help:

    https://www.megamenu.com/documentation/removing-residual-styling/

    Regards,
    Tom

    Thread Starter shweta1807

    (@shweta1807)

    Hi

    Thank you for your response.

    We have checked at our end and trying to resolve the issue.

    Below is the structure
    We have

    • and <div> under
    • I was able to remove the div under
    • from “widget.manager_class.php” from my Impreza theme

      Now, I want to remove the <div> under <ul class=”w-nav-list level_1 hover_simple hidden”> which is “<div id=”mega-menu-wrap-us_main_menu” but not successful to find this anywhere.

      Below is the code for your reference

      wp_nav_menu( array(

      ‘theme_location’ => $menu_location,

      //’container’ => ”,

      //’container_class’ => ‘w-nav-list’,

      //’walker’ => new US_Walker_Nav_Menu,

      //’items_wrap’ => ‘%3$s’,

      //’fallback_cb’ => FALSE,

      ) );

      echo ‘

    ‘;

    echo ‘<div class=”w-nav-options hidden”‘;

    echo us_pass_data_to_js( array(

    ‘mobileWidth’ => intval( $mobile_width ),

    ‘mobileBehavior’ => intval( $mobile_behavior ),

    ) );

    echo ‘></div>’;

    echo ‘</nav>’;

    Though the is closed before the div.

    Could you please check this and guide me for some solution.

    Many Thanks

    Plugin Author megamenu

    (@megamenu)

    Hi,

    “widget.manager_class.php” – that sounds like a file in the megamenu plugin. Please do not edit that one (if you are editing that you are looking in the wrong place).

    It is the <ul class=”w-nav-list level_1 hover_simple hidden”> bit that you need to remove, not the <div id=”mega-menu-wrap-us_main_menu">.

    You should find the <ul class=”w-nav-list level_1 hover_simple hidden”> code in your theme files somewhere.

    Regards,
    Tom

    Thread Starter shweta1807

    (@shweta1807)

    Hi Tom, Yes I have found that <ul class=”w-nav-list level_1 hover_simple hidden”> but what needs to be done after that? I am not able to proceed further after this. Please suggest

    Plugin Author megamenu

    (@megamenu)

    Hi Shweta,

    Nothing needs to be done after that – all you need to do is remove that from your theme.

    How it looks now: https://screencast.com/t/nhhBHgTAb
    How it needs to look: https://screencast.com/t/XWeDTcY37 (the UL wrapper around the menu has been removed)

    Then your page should validate correctly.

    Regards,
    Tom

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Mega Menu’ is closed to new replies.