WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Menu Widget
[resolved] HTML validation error | duplicated IDs (3 posts)

  1. Carsten Bach
    Member
    Posted 1 year ago #

    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/

  2. JohnnyPea
    Member
    Plugin Author

    Posted 1 year ago #

    This should be fixed now... http://core.trac.wordpress.org/ticket/13976

  3. Carsten Bach
    Member
    Posted 1 year ago #

    Good to know, thanks for mentioning.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic