Home Forums WP Nav Plus Installation and Configuration Adding schema / attributes

This topic contains 1 reply, has 2 voices, and was last updated by  Matt Keys 2 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #7124


    Hi Matt,

    Just wondering if there’s a way of adding some schema / attributes to the menus that are generated. For example I can get it to produce

    <nav class="nav-primary">

    But for SEO and accessibility purposes I’d ideally like it to be something like

    <nav class="nav-primary" role="navigation" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement" >




    Matt Keys

    Hey Ben,

    That sort of change could be done using a WordPress menu walker http://codex.wordpress.org/Class_Reference/Walker

    You could also look into if the items_wrap argument of wp_nav_menu will do what you need: http://codex.wordpress.org/Function_Reference/wp_nav_menu



Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.