WordPress.org

Support

Support » Plugins and Hacks » Advanced Menu Widget » [Resolved] [Plugin: Advanced Menu Widget] HTML validation error | duplicated IDs

[Resolved] [Plugin: Advanced Menu Widget] HTML validation error | duplicated IDs

  • Using the same menu twice on the same page results in a “duplicated IDs” error in HTML validation, because the list elements of the typical wp_nav_menu() output get an id=”menu-item-ID”.

    So if we use our Main-Navigation as a sitemap-like list in the footer, the HTML fails validation.

    Because I found no way to filter your plugin output, I helped me “dirty” by adding a page-wide filter.

    function remove_menu_ids () {
            add_filter( 'nav_menu_item_id', '__return_null' );
        }
        add_action( 'init', 'remove_menu_ids' );

    Would be nice, to have your plugin handle theese duplicated IDs.

    http://wordpress.org/extend/plugins/advanced-menu-widget/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] [Plugin: Advanced Menu Widget] HTML validation error | duplicated IDs’ is closed to new replies.
Skip to toolbar