Adding a within ‘s from wp_nav_menu()

Yes, items_wrap is used to to modify or replace the default <ul> wrapper. To wrap the individual links inside of that element, simply use link_before and link_after, like so:

wp_nav_menu( array( 
    'theme_location' => 'some-location',
    'link_before' => '<span>',
    'link_after' => '</span>',
) );

Leave a Comment