Add Elements to the Built in Menu
If you want to add an html element such as a span or strong tag to your native WordPress menu in or navigation here is a snippet for that. The following code replaces or modifies your existing code that links to your menu
1 2 3 4 5 6 | <?php wp_nav_menu( array( 'menu' => 'Menu Name', 'sort_column' => 'menu_order', 'container_class' => 'menu-header', 'theme_location' => 'primary', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?> |
For custom menus replace “Menu Name” […]